gluesql 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,6 @@
8
8
 
9
9
  GlueSQL.js is a SQL database for web browsers and Node.js. It works as an embedded database and entirely runs in the browser.
10
10
  GlueSQL.js supports in-memory storage backend, but it will soon to have localStorage, sessionStorage and indexedDB backend supports.
11
-
12
11
  ## Installation
13
12
 
14
13
  #### Yarn
@@ -23,7 +22,7 @@ npm install gluesql
23
22
 
24
23
  #### JavaScript modules
25
24
  ```javascript
26
- import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.11.0/gluesql.js';
25
+ import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.13.0/gluesql.js';
27
26
  ```
28
27
 
29
28
  ## Usage
@@ -33,7 +32,7 @@ import { gluesql } from 'gluesql';
33
32
 
34
33
  const db = await gluesql();
35
34
 
36
- db.query(`
35
+ await db.query(`
37
36
  CREATE TABLE User (id INTEGER, name TEXT);
38
37
  INSERT INTO User VALUES (1, "Hello"), (2, "World");
39
38
  `);
@@ -46,7 +45,7 @@ console.log(rows);
46
45
  ## Examples
47
46
  * [JavaScript modules](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/web/module)
48
47
  * [Rollup](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/web/rollup)
49
- * [Webpack](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/web/rollup)
48
+ * [Webpack](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/web/webpack)
50
49
  * [Node.js](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/nodejs)
51
50
 
52
51
  ## 🚧 Documentation- WIP
@@ -3,26 +3,6 @@ imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
4
  const { TextDecoder, TextEncoder } = require(`util`);
5
5
 
6
- const heap = new Array(32).fill(undefined);
7
-
8
- heap.push(undefined, null, true, false);
9
-
10
- function getObject(idx) { return heap[idx]; }
11
-
12
- let heap_next = heap.length;
13
-
14
- function dropObject(idx) {
15
- if (idx < 36) return;
16
- heap[idx] = heap_next;
17
- heap_next = idx;
18
- }
19
-
20
- function takeObject(idx) {
21
- const ret = getObject(idx);
22
- dropObject(idx);
23
- return ret;
24
- }
25
-
26
6
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
27
7
 
28
8
  cachedTextDecoder.decode();
@@ -39,6 +19,12 @@ function getStringFromWasm0(ptr, len) {
39
19
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
40
20
  }
41
21
 
22
+ const heap = new Array(32).fill(undefined);
23
+
24
+ heap.push(undefined, null, true, false);
25
+
26
+ let heap_next = heap.length;
27
+
42
28
  function addHeapObject(obj) {
43
29
  if (heap_next === heap.length) heap.push(heap.length + 1);
44
30
  const idx = heap_next;
@@ -48,6 +34,20 @@ function addHeapObject(obj) {
48
34
  return idx;
49
35
  }
50
36
 
37
+ function getObject(idx) { return heap[idx]; }
38
+
39
+ function dropObject(idx) {
40
+ if (idx < 36) return;
41
+ heap[idx] = heap_next;
42
+ heap_next = idx;
43
+ }
44
+
45
+ function takeObject(idx) {
46
+ const ret = getObject(idx);
47
+ dropObject(idx);
48
+ return ret;
49
+ }
50
+
51
51
  function makeMutClosure(arg0, arg1, dtor, f) {
52
52
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
53
53
  const real = (...args) => {
@@ -73,7 +73,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
73
73
  return real;
74
74
  }
75
75
  function __wbg_adapter_22(arg0, arg1, arg2) {
76
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ca1831d18a66992(arg0, arg1, addHeapObject(arg2));
76
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h219d4f1f418bd857(arg0, arg1, addHeapObject(arg2));
77
77
  }
78
78
 
79
79
  let WASM_VECTOR_LEN = 0;
@@ -151,7 +151,7 @@ function getArrayU8FromWasm0(ptr, len) {
151
151
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
152
152
  }
153
153
  function __wbg_adapter_59(arg0, arg1, arg2, arg3) {
154
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hf12637b74e1a10cc(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
154
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h15dfab62720e3232(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
155
155
  }
156
156
 
157
157
  /**
@@ -195,16 +195,16 @@ class Glue {
195
195
  }
196
196
  module.exports.Glue = Glue;
197
197
 
198
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
199
- takeObject(arg0);
200
- };
201
-
202
198
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
203
199
  const ret = getStringFromWasm0(arg0, arg1);
204
200
  return addHeapObject(ret);
205
201
  };
206
202
 
207
- module.exports.__wbg_log_1587ce2a67207c54 = function(arg0, arg1) {
203
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
204
+ takeObject(arg0);
205
+ };
206
+
207
+ module.exports.__wbg_log_819d5f8ad601b300 = function(arg0, arg1) {
208
208
  console.log(getStringFromWasm0(arg0, arg1));
209
209
  };
210
210
 
@@ -244,14 +244,6 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
244
244
  return ret;
245
245
  };
246
246
 
247
- module.exports.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
248
- getObject(arg0).getRandomValues(getObject(arg1));
249
- }, arguments) };
250
-
251
- module.exports.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
252
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
253
- }, arguments) };
254
-
255
247
  module.exports.__wbg_process_2f24d6544ea7b200 = function(arg0) {
256
248
  const ret = getObject(arg0).process;
257
249
  return addHeapObject(ret);
@@ -293,6 +285,14 @@ module.exports.__wbg_msCrypto_a2cdb043d2bfe57f = function(arg0) {
293
285
  return addHeapObject(ret);
294
286
  };
295
287
 
288
+ module.exports.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
289
+ getObject(arg0).getRandomValues(getObject(arg1));
290
+ }, arguments) };
291
+
292
+ module.exports.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
293
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
294
+ }, arguments) };
295
+
296
296
  module.exports.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) {
297
297
  const ret = new Function(getStringFromWasm0(arg0, arg1));
298
298
  return addHeapObject(ret);
@@ -303,6 +303,31 @@ module.exports.__wbg_call_ae78342adc33730a = function() { return handleError(fun
303
303
  return addHeapObject(ret);
304
304
  }, arguments) };
305
305
 
306
+ module.exports.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () {
307
+ const ret = self.self;
308
+ return addHeapObject(ret);
309
+ }, arguments) };
310
+
311
+ module.exports.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () {
312
+ const ret = window.window;
313
+ return addHeapObject(ret);
314
+ }, arguments) };
315
+
316
+ module.exports.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () {
317
+ const ret = globalThis.globalThis;
318
+ return addHeapObject(ret);
319
+ }, arguments) };
320
+
321
+ module.exports.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () {
322
+ const ret = global.global;
323
+ return addHeapObject(ret);
324
+ }, arguments) };
325
+
326
+ module.exports.__wbindgen_is_undefined = function(arg0) {
327
+ const ret = getObject(arg0) === undefined;
328
+ return ret;
329
+ };
330
+
306
331
  module.exports.__wbg_call_3ed288a247f13ea5 = function() { return handleError(function (arg0, arg1, arg2) {
307
332
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
308
333
  return addHeapObject(ret);
@@ -347,31 +372,6 @@ module.exports.__wbg_then_ce526c837d07b68f = function(arg0, arg1) {
347
372
  return addHeapObject(ret);
348
373
  };
349
374
 
350
- module.exports.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () {
351
- const ret = self.self;
352
- return addHeapObject(ret);
353
- }, arguments) };
354
-
355
- module.exports.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () {
356
- const ret = window.window;
357
- return addHeapObject(ret);
358
- }, arguments) };
359
-
360
- module.exports.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () {
361
- const ret = globalThis.globalThis;
362
- return addHeapObject(ret);
363
- }, arguments) };
364
-
365
- module.exports.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () {
366
- const ret = global.global;
367
- return addHeapObject(ret);
368
- }, arguments) };
369
-
370
- module.exports.__wbindgen_is_undefined = function(arg0) {
371
- const ret = getObject(arg0) === undefined;
372
- return ret;
373
- };
374
-
375
375
  module.exports.__wbg_buffer_7af23f65f6c64548 = function(arg0) {
376
376
  const ret = getObject(arg0).buffer;
377
377
  return addHeapObject(ret);
@@ -415,8 +415,8 @@ module.exports.__wbindgen_memory = function() {
415
415
  return addHeapObject(ret);
416
416
  };
417
417
 
418
- module.exports.__wbindgen_closure_wrapper799 = function(arg0, arg1, arg2) {
419
- const ret = makeMutClosure(arg0, arg1, 135, __wbg_adapter_22);
418
+ module.exports.__wbindgen_closure_wrapper432 = function(arg0, arg1, arg2) {
419
+ const ret = makeMutClosure(arg0, arg1, 87, __wbg_adapter_22);
420
420
  return addHeapObject(ret);
421
421
  };
422
422
 
Binary file
@@ -4,7 +4,7 @@
4
4
  "Taehoon Moon <taehoon.moon@outlook.com>"
5
5
  ],
6
6
  "description": "GlueSQL - Open source SQL database engine fully written in Rust with pure functional execution layer, easily swappable storage and web assembly support!",
7
- "version": "0.11.0",
7
+ "version": "0.13.0",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",
@@ -1,26 +1,6 @@
1
1
 
2
2
  let wasm;
3
3
 
4
- const heap = new Array(32).fill(undefined);
5
-
6
- heap.push(undefined, null, true, false);
7
-
8
- function getObject(idx) { return heap[idx]; }
9
-
10
- let heap_next = heap.length;
11
-
12
- function dropObject(idx) {
13
- if (idx < 36) return;
14
- heap[idx] = heap_next;
15
- heap_next = idx;
16
- }
17
-
18
- function takeObject(idx) {
19
- const ret = getObject(idx);
20
- dropObject(idx);
21
- return ret;
22
- }
23
-
24
4
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
5
 
26
6
  cachedTextDecoder.decode();
@@ -37,6 +17,12 @@ function getStringFromWasm0(ptr, len) {
37
17
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
38
18
  }
39
19
 
20
+ const heap = new Array(32).fill(undefined);
21
+
22
+ heap.push(undefined, null, true, false);
23
+
24
+ let heap_next = heap.length;
25
+
40
26
  function addHeapObject(obj) {
41
27
  if (heap_next === heap.length) heap.push(heap.length + 1);
42
28
  const idx = heap_next;
@@ -46,6 +32,20 @@ function addHeapObject(obj) {
46
32
  return idx;
47
33
  }
48
34
 
35
+ function getObject(idx) { return heap[idx]; }
36
+
37
+ function dropObject(idx) {
38
+ if (idx < 36) return;
39
+ heap[idx] = heap_next;
40
+ heap_next = idx;
41
+ }
42
+
43
+ function takeObject(idx) {
44
+ const ret = getObject(idx);
45
+ dropObject(idx);
46
+ return ret;
47
+ }
48
+
49
49
  function makeMutClosure(arg0, arg1, dtor, f) {
50
50
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
51
51
  const real = (...args) => {
@@ -71,7 +71,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
71
71
  return real;
72
72
  }
73
73
  function __wbg_adapter_22(arg0, arg1, arg2) {
74
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ca1831d18a66992(arg0, arg1, addHeapObject(arg2));
74
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h219d4f1f418bd857(arg0, arg1, addHeapObject(arg2));
75
75
  }
76
76
 
77
77
  let WASM_VECTOR_LEN = 0;
@@ -149,7 +149,7 @@ function getArrayU8FromWasm0(ptr, len) {
149
149
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
150
150
  }
151
151
  function __wbg_adapter_59(arg0, arg1, arg2, arg3) {
152
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hf12637b74e1a10cc(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
152
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h15dfab62720e3232(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
153
153
  }
154
154
 
155
155
  /**
@@ -229,14 +229,14 @@ async function init(input) {
229
229
  }
230
230
  const imports = {};
231
231
  imports.wbg = {};
232
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
233
- takeObject(arg0);
234
- };
235
232
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
236
233
  const ret = getStringFromWasm0(arg0, arg1);
237
234
  return addHeapObject(ret);
238
235
  };
239
- imports.wbg.__wbg_log_1587ce2a67207c54 = function(arg0, arg1) {
236
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
237
+ takeObject(arg0);
238
+ };
239
+ imports.wbg.__wbg_log_819d5f8ad601b300 = function(arg0, arg1) {
240
240
  console.log(getStringFromWasm0(arg0, arg1));
241
241
  };
242
242
  imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
@@ -270,12 +270,6 @@ async function init(input) {
270
270
  const ret = false;
271
271
  return ret;
272
272
  };
273
- imports.wbg.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
274
- getObject(arg0).getRandomValues(getObject(arg1));
275
- }, arguments) };
276
- imports.wbg.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
277
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
278
- }, arguments) };
279
273
  imports.wbg.__wbg_process_2f24d6544ea7b200 = function(arg0) {
280
274
  const ret = getObject(arg0).process;
281
275
  return addHeapObject(ret);
@@ -309,6 +303,12 @@ async function init(input) {
309
303
  const ret = getObject(arg0).msCrypto;
310
304
  return addHeapObject(ret);
311
305
  };
306
+ imports.wbg.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
307
+ getObject(arg0).getRandomValues(getObject(arg1));
308
+ }, arguments) };
309
+ imports.wbg.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
310
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
311
+ }, arguments) };
312
312
  imports.wbg.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) {
313
313
  const ret = new Function(getStringFromWasm0(arg0, arg1));
314
314
  return addHeapObject(ret);
@@ -317,6 +317,26 @@ async function init(input) {
317
317
  const ret = getObject(arg0).call(getObject(arg1));
318
318
  return addHeapObject(ret);
319
319
  }, arguments) };
320
+ imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () {
321
+ const ret = self.self;
322
+ return addHeapObject(ret);
323
+ }, arguments) };
324
+ imports.wbg.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () {
325
+ const ret = window.window;
326
+ return addHeapObject(ret);
327
+ }, arguments) };
328
+ imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () {
329
+ const ret = globalThis.globalThis;
330
+ return addHeapObject(ret);
331
+ }, arguments) };
332
+ imports.wbg.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () {
333
+ const ret = global.global;
334
+ return addHeapObject(ret);
335
+ }, arguments) };
336
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
337
+ const ret = getObject(arg0) === undefined;
338
+ return ret;
339
+ };
320
340
  imports.wbg.__wbg_call_3ed288a247f13ea5 = function() { return handleError(function (arg0, arg1, arg2) {
321
341
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
322
342
  return addHeapObject(ret);
@@ -355,26 +375,6 @@ async function init(input) {
355
375
  const ret = getObject(arg0).then(getObject(arg1));
356
376
  return addHeapObject(ret);
357
377
  };
358
- imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () {
359
- const ret = self.self;
360
- return addHeapObject(ret);
361
- }, arguments) };
362
- imports.wbg.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () {
363
- const ret = window.window;
364
- return addHeapObject(ret);
365
- }, arguments) };
366
- imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () {
367
- const ret = globalThis.globalThis;
368
- return addHeapObject(ret);
369
- }, arguments) };
370
- imports.wbg.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () {
371
- const ret = global.global;
372
- return addHeapObject(ret);
373
- }, arguments) };
374
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
375
- const ret = getObject(arg0) === undefined;
376
- return ret;
377
- };
378
378
  imports.wbg.__wbg_buffer_7af23f65f6c64548 = function(arg0) {
379
379
  const ret = getObject(arg0).buffer;
380
380
  return addHeapObject(ret);
@@ -409,8 +409,8 @@ async function init(input) {
409
409
  const ret = wasm.memory;
410
410
  return addHeapObject(ret);
411
411
  };
412
- imports.wbg.__wbindgen_closure_wrapper799 = function(arg0, arg1, arg2) {
413
- const ret = makeMutClosure(arg0, arg1, 135, __wbg_adapter_22);
412
+ imports.wbg.__wbindgen_closure_wrapper432 = function(arg0, arg1, arg2) {
413
+ const ret = makeMutClosure(arg0, arg1, 87, __wbg_adapter_22);
414
414
  return addHeapObject(ret);
415
415
  };
416
416
 
Binary file
@@ -4,7 +4,7 @@
4
4
  "Taehoon Moon <taehoon.moon@outlook.com>"
5
5
  ],
6
6
  "description": "GlueSQL - Open source SQL database engine fully written in Rust with pure functional execution layer, easily swappable storage and web assembly support!",
7
- "version": "0.11.0",
7
+ "version": "0.13.0",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",