gluesql 0.14.3 → 0.14.4-rc.1

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.
@@ -0,0 +1,55 @@
1
+ # GlueSQL.js
2
+
3
+ [![npm](https://img.shields.io/npm/v/gluesql)](https://www.npmjs.com/package/gluesql)
4
+ [![GitHub](https://img.shields.io/github/stars/gluesql/gluesql)](https://github.com/gluesql/gluesql)
5
+ [![LICENSE](https://img.shields.io/crates/l/gluesql.svg)](https://github.com/gluesql/gluesql/blob/main/LICENSE)
6
+ [![Chat](https://img.shields.io/discord/780298017940176946)](https://discord.gg/C6TDEgzDzY)
7
+ [![Coverage Status](https://coveralls.io/repos/github/gluesql/gluesql/badge.svg?branch=main)](https://coveralls.io/github/gluesql/gluesql?branch=main)
8
+
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
+ GlueSQL.js supports in-memory storage backend, localStorage, sessionStorage and indexedDB backend supports.
11
+
12
+
13
+ Learn more at the **<https://gluesql.org/docs>**
14
+
15
+ * [Getting Started - JavaScript](https://gluesql.org/docs/dev/getting-started/javascript-web)
16
+ * [Getting Started - Node.js](https://gluesql.org/docs/dev/getting-started/nodejs)
17
+ * [SQL Syntax](https://gluesql.org/docs/dev/sql-syntax/intro)
18
+
19
+ ## Installation
20
+
21
+ #### Yarn
22
+ ```
23
+ yarn add gluesql
24
+ ```
25
+
26
+ #### npm
27
+ ```
28
+ npm install gluesql
29
+ ```
30
+
31
+ #### JavaScript modules
32
+ ```javascript
33
+ import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.14.0/gluesql.js';
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```javascript
39
+ import { gluesql } from 'gluesql';
40
+
41
+ const db = await gluesql();
42
+
43
+ await db.query(`
44
+ CREATE TABLE User (id INTEGER, name TEXT);
45
+ INSERT INTO User VALUES (1, "Hello"), (2, "World");
46
+ `);
47
+
48
+ const [{ rows }] = await db.query('SELECT * FROM User;');
49
+
50
+ console.log(rows);
51
+ ```
52
+
53
+ ## License
54
+
55
+ This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](https://raw.githubusercontent.com/gluesql/gluesql/main/LICENSE) file for details.
@@ -206,8 +206,8 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
206
206
  takeObject(arg0);
207
207
  };
208
208
 
209
- module.exports.__wbg_log_ad3161670ab77d95 = function(arg0, arg1) {
210
- console.log(getStringFromWasm0(arg0, arg1));
209
+ module.exports.__wbg_debug_f66fd1f8bf37502a = function(arg0, arg1) {
210
+ console.debug(getStringFromWasm0(arg0, arg1));
211
211
  };
212
212
 
213
213
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
@@ -422,8 +422,8 @@ module.exports.__wbindgen_memory = function() {
422
422
  return addHeapObject(ret);
423
423
  };
424
424
 
425
- module.exports.__wbindgen_closure_wrapper999 = function(arg0, arg1, arg2) {
426
- const ret = makeMutClosure(arg0, arg1, 98, __wbg_adapter_22);
425
+ module.exports.__wbindgen_closure_wrapper861 = function(arg0, arg1, arg2) {
426
+ const ret = makeMutClosure(arg0, arg1, 97, __wbg_adapter_22);
427
427
  return addHeapObject(ret);
428
428
  };
429
429
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gluesql",
3
- "version": "0.14.3",
3
+ "version": "0.14.4-rc.1",
4
4
  "description": "GlueSQL is quite sticky, it attaches to anywhere",
5
5
  "browser": "gluesql.js",
6
6
  "main": "gluesql.node.js",
package/web/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # GlueSQL.js
2
+
3
+ [![npm](https://img.shields.io/npm/v/gluesql)](https://www.npmjs.com/package/gluesql)
4
+ [![GitHub](https://img.shields.io/github/stars/gluesql/gluesql)](https://github.com/gluesql/gluesql)
5
+ [![LICENSE](https://img.shields.io/crates/l/gluesql.svg)](https://github.com/gluesql/gluesql/blob/main/LICENSE)
6
+ [![Chat](https://img.shields.io/discord/780298017940176946)](https://discord.gg/C6TDEgzDzY)
7
+ [![Coverage Status](https://coveralls.io/repos/github/gluesql/gluesql/badge.svg?branch=main)](https://coveralls.io/github/gluesql/gluesql?branch=main)
8
+
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
+ GlueSQL.js supports in-memory storage backend, localStorage, sessionStorage and indexedDB backend supports.
11
+
12
+
13
+ Learn more at the **<https://gluesql.org/docs>**
14
+
15
+ * [Getting Started - JavaScript](https://gluesql.org/docs/dev/getting-started/javascript-web)
16
+ * [Getting Started - Node.js](https://gluesql.org/docs/dev/getting-started/nodejs)
17
+ * [SQL Syntax](https://gluesql.org/docs/dev/sql-syntax/intro)
18
+
19
+ ## Installation
20
+
21
+ #### Yarn
22
+ ```
23
+ yarn add gluesql
24
+ ```
25
+
26
+ #### npm
27
+ ```
28
+ npm install gluesql
29
+ ```
30
+
31
+ #### JavaScript modules
32
+ ```javascript
33
+ import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.14.0/gluesql.js';
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```javascript
39
+ import { gluesql } from 'gluesql';
40
+
41
+ const db = await gluesql();
42
+
43
+ await db.query(`
44
+ CREATE TABLE User (id INTEGER, name TEXT);
45
+ INSERT INTO User VALUES (1, "Hello"), (2, "World");
46
+ `);
47
+
48
+ const [{ rows }] = await db.query('SELECT * FROM User;');
49
+
50
+ console.log(rows);
51
+ ```
52
+
53
+ ## License
54
+
55
+ This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](https://raw.githubusercontent.com/gluesql/gluesql/main/LICENSE) file for details.
package/web/gluesql_js.js CHANGED
@@ -194,10 +194,13 @@ export class Glue {
194
194
  return Glue.__wrap(ret);
195
195
  }
196
196
  /**
197
+ * @param {string | undefined} namespace
197
198
  * @returns {Promise<any>}
198
199
  */
199
- loadIndexedDB() {
200
- const ret = wasm.glue_loadIndexedDB(this.ptr);
200
+ loadIndexedDB(namespace) {
201
+ var ptr0 = isLikeNone(namespace) ? 0 : passStringToWasm0(namespace, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
202
+ var len0 = WASM_VECTOR_LEN;
203
+ const ret = wasm.glue_loadIndexedDB(this.ptr, ptr0, len0);
201
204
  return takeObject(ret);
202
205
  }
203
206
  /**
@@ -271,8 +274,8 @@ function getImports() {
271
274
  const ret = getStringFromWasm0(arg0, arg1);
272
275
  return addHeapObject(ret);
273
276
  };
274
- imports.wbg.__wbg_log_ad3161670ab77d95 = function(arg0, arg1) {
275
- console.log(getStringFromWasm0(arg0, arg1));
277
+ imports.wbg.__wbg_debug_f66fd1f8bf37502a = function(arg0, arg1) {
278
+ console.debug(getStringFromWasm0(arg0, arg1));
276
279
  };
277
280
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
278
281
  const ret = new Error();
@@ -292,10 +295,6 @@ function getImports() {
292
295
  wasm.__wbindgen_export_6(arg0, arg1);
293
296
  }
294
297
  };
295
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
296
- const ret = getObject(arg0) === undefined;
297
- return ret;
298
- };
299
298
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
300
299
  const obj = getObject(arg1);
301
300
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -308,6 +307,10 @@ function getImports() {
308
307
  const ret = getObject(arg0) === null;
309
308
  return ret;
310
309
  };
310
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
311
+ const ret = getObject(arg0) === undefined;
312
+ return ret;
313
+ };
311
314
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
312
315
  const obj = takeObject(arg0).original;
313
316
  if (obj.cnt-- == 1) {
@@ -754,16 +757,16 @@ function getImports() {
754
757
  const ret = wasm.memory;
755
758
  return addHeapObject(ret);
756
759
  };
757
- imports.wbg.__wbindgen_closure_wrapper3077 = function(arg0, arg1, arg2) {
760
+ imports.wbg.__wbindgen_closure_wrapper2085 = function(arg0, arg1, arg2) {
758
761
  const ret = makeMutClosure(arg0, arg1, 386, __wbg_adapter_26);
759
762
  return addHeapObject(ret);
760
763
  };
761
- imports.wbg.__wbindgen_closure_wrapper3513 = function(arg0, arg1, arg2) {
762
- const ret = makeMutClosure(arg0, arg1, 506, __wbg_adapter_29);
764
+ imports.wbg.__wbindgen_closure_wrapper2298 = function(arg0, arg1, arg2) {
765
+ const ret = makeMutClosure(arg0, arg1, 456, __wbg_adapter_29);
763
766
  return addHeapObject(ret);
764
767
  };
765
- imports.wbg.__wbindgen_closure_wrapper3714 = function(arg0, arg1, arg2) {
766
- const ret = makeMutClosure(arg0, arg1, 562, __wbg_adapter_32);
768
+ imports.wbg.__wbindgen_closure_wrapper2499 = function(arg0, arg1, arg2) {
769
+ const ret = makeMutClosure(arg0, arg1, 512, __wbg_adapter_32);
767
770
  return addHeapObject(ret);
768
771
  };
769
772
 
Binary file