Skip to content

Latest commit

 

History

History

gluesql-js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GlueSQL.js

npm GitHub LICENSE Chat codecov.io

GlueSQL.js is a SQL database for web browsers and Node.js. It works as an embedded database and entirely runs in the browser. GlueSQL.js supports in-memory storage backend, but it will soon to have localStorage, sessionStorage and indexedDB backend supports.

Installation

Yarn

yarn add gluesql

npm

npm install gluesql

JavaScript modules

import { gluesql } from 'https://cdn.jsdelivr.net/npm/gluesql@0.11.0/gluesql.js';

Usage

import { gluesql } from 'gluesql';

const db = await gluesql();

db.query(`
  CREATE TABLE User (id INTEGER, name TEXT);
  INSERT INTO User VALUES (1, "Hello"), (2, "World");
`);

const [{ rows }] = await db.query('SELECT * FROM User;');

console.log(rows);

Examples

🚧 Documentation- WIP