gluesql 0.12.0 → 0.14.3

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
@@ -4,10 +4,18 @@
4
4
  [![GitHub](https://img.shields.io/github/stars/gluesql/gluesql)](https://github.com/gluesql/gluesql)
5
5
  [![LICENSE](https://img.shields.io/crates/l/gluesql.svg)](https://github.com/gluesql/gluesql/blob/main/LICENSE)
6
6
  [![Chat](https://img.shields.io/discord/780298017940176946)](https://discord.gg/C6TDEgzDzY)
7
- [![codecov.io](https://codecov.io/github/gluesql/gluesql/coverage.svg?branch=main)](https://codecov.io/github/gluesql/gluesql?branch=main)
7
+ [![Coverage Status](https://coveralls.io/repos/github/gluesql/gluesql/badge.svg?branch=main)](https://coveralls.io/github/gluesql/gluesql?branch=main)
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
- GlueSQL.js supports in-memory storage backend, but it will soon to have localStorage, sessionStorage and indexedDB backend supports.
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
+
11
19
  ## Installation
12
20
 
13
21
  #### Yarn
@@ -22,7 +30,7 @@ npm install gluesql
22
30
 
23
31
  #### JavaScript modules
24
32
  ```javascript
25
- import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.12.0/gluesql.js';
33
+ import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.14.0/gluesql.js';
26
34
  ```
27
35
 
28
36
  ## Usage
@@ -32,7 +40,7 @@ import { gluesql } from 'gluesql';
32
40
 
33
41
  const db = await gluesql();
34
42
 
35
- db.query(`
43
+ await db.query(`
36
44
  CREATE TABLE User (id INTEGER, name TEXT);
37
45
  INSERT INTO User VALUES (1, "Hello"), (2, "World");
38
46
  `);
@@ -42,13 +50,6 @@ const [{ rows }] = await db.query('SELECT * FROM User;');
42
50
  console.log(rows);
43
51
  ```
44
52
 
45
- ## Examples
46
- * [JavaScript modules](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/web/module)
47
- * [Rollup](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)
49
- * [Node.js](https://github.com/gluesql/gluesql/tree/main/gluesql-js/examples/nodejs)
53
+ ## License
50
54
 
51
- ## 🚧 Documentation- WIP
52
- * [General examples](https://github.com/gluesql/gluesql/tree/main/test-suite/src)
53
- * [Supported data types](https://github.com/gluesql/gluesql/tree/main/test-suite/src/data_type)
54
- * [Supported SQL functions](https://github.com/gluesql/gluesql/tree/main/test-suite/src/function)
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/gluesql.js CHANGED
@@ -1,16 +1,16 @@
1
- import init, { Glue } from './dist/web/gluesql_js.js';
1
+ import init, { Glue } from './web/gluesql_js.js';
2
2
 
3
3
  let loaded = false;
4
4
 
5
- async function load() {
6
- await init();
5
+ async function load(module_or_path) {
6
+ await init(module_or_path);
7
7
 
8
8
  loaded = true;
9
9
  }
10
10
 
11
- export async function gluesql() {
11
+ export async function gluesql(module_or_path) {
12
12
  if (!loaded) {
13
- await load();
13
+ await load(module_or_path);
14
14
  }
15
15
 
16
16
  return new Glue();
package/gluesql.node.js CHANGED
@@ -1,4 +1,4 @@
1
- const { Glue } = require('./dist/nodejs/gluesql_js.js');
1
+ const { Glue } = require('./nodejs/gluesql_js.js');
2
2
 
3
3
  function gluesql() {
4
4
  return new Glue();