All Projects → gluesql → gluesql-js

gluesql / gluesql-js

Licence: Apache-2.0 license
GlueSQL JavaScript Interface

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to gluesql-js

client-persist
Offline storage for your web client. Supports IndexedDB, WebSQL, localStorage and sessionStorage with an easy to crawl with API.
Stars: ✭ 14 (-76.27%)
Mutual labels:  websql
MonetDBLite-R
MonetDB reconfigured as an R package - See below for an introduction. Edit
Stars: ✭ 63 (+6.78%)
Mutual labels:  sql-database
entitype
An ORM framework for Typescript that lets you fluently query the database with a strong typed programming interface.
Stars: ✭ 12 (-79.66%)
Mutual labels:  websql
browserStorage
浏览器本地存储封装
Stars: ✭ 30 (-49.15%)
Mutual labels:  websql
activerecord-crate-adapter
Ruby on Rails ActiveRecord adapter for CrateDB
Stars: ✭ 27 (-54.24%)
Mutual labels:  sql-database
bank-statement-analysis
Flask application generating interactive visualisations from bank statements PDF documents
Stars: ✭ 31 (-47.46%)
Mutual labels:  sql-database
AndroidEasySQL-Library
An Easier & Lazier approach to SQL database for Android
Stars: ✭ 28 (-52.54%)
Mutual labels:  sql-database
crate ruby
A Ruby client library for CrateDB.
Stars: ✭ 31 (-47.46%)
Mutual labels:  sql-database
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+44915.25%)
Mutual labels:  websql
Localforage
💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.
Stars: ✭ 19,840 (+33527.12%)
Mutual labels:  websql
web-DB-tools
web平台数据库SQL执行工具,权限、SQL收藏、SQL分享、以及一些小工具、webSQL
Stars: ✭ 56 (-5.08%)
Mutual labels:  websql
websqldump
An ultra-light JS library for exporting data out of WebSQL
Stars: ✭ 36 (-38.98%)
Mutual labels:  websql
sync-client
SyncProxy javascript client with support for all major embedded databases (IndexedDB, SQLite, WebSQL, LokiJS...)
Stars: ✭ 30 (-49.15%)
Mutual labels:  websql
sqlweb
SqlWeb is an extension of JsStore which allows to use sql query for performing database operation in IndexedDB.
Stars: ✭ 38 (-35.59%)
Mutual labels:  websql
pouchy
A simple, opinionated interface for PouchDB 👝
Stars: ✭ 59 (+0%)
Mutual labels:  websql
Stampede
The ToroDB solution to provide better analytics on top of MongoDB and make it easier to migrate from MongoDB to SQL
Stars: ✭ 1,754 (+2872.88%)
Mutual labels:  sql-database
Php Crud Api
Single file PHP script that adds a REST API to a SQL database
Stars: ✭ 2,904 (+4822.03%)
Mutual labels:  sql-database
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-79.66%)
Mutual labels:  sql-database
MonetDB
This is the official mirror of the MonetDB Mercurial repository. Please note that we do not accept pull requests on github. The regression test results can be found on the MonetDB Testweb http://monetdb.cwi.nl/testweb/web/status.php .For contributions please see: https://www.monetdb.org/Developers
Stars: ✭ 163 (+176.27%)
Mutual labels:  sql-database
Desktop-Applications-JavaFX
JavaFX Open Source Projects
Stars: ✭ 69 (+16.95%)
Mutual labels:  sql-database

gluesql-js has been moved to the GlueSQL main repo

Link

https://github.com/gluesql/gluesql/tree/main/gluesql-js


GlueSQL-js

npm version License

Use SQL in web browsers!

GlueSQL-js provides 3 storage options

  • In-memory
  • LocalStorage
  • SessionStorage

📦 Installation

npm install gluesql

☁️ Usage

const gluesql = import('gluesql');

async function main() {
  const { Glue } = await gluesql;
  const db = new Glue("memory");
  /* other options:
    const db = new Glue("localstorage", "{db-name}");
    const db = new Glue("sessionstorage", "{db-name}");
  */
  
  const sql = `
    CREATE TABLE Test (id INTEGER, name TEXT);
    INSERT INTO Test VALUES (101, "Glue");
    INSERT INTO Test VALUES (102, "Rust");
    INSERT INTO Test VALUES (103, "Yeah");
  `;
  
  await db.execute(sql);

  const items = (await db.execute("SELECT * FROM Test WHERE id < 103;"))[0];
  /* items:
    [
      [101, "Glue"],
      [102, "Rust"],
    ] 
  */
}

Examples

📚 Features

📗 Supported Queries

  • CREATE TABLE
  • ALTER TABLE
  • INSERT
  • UPDATE
  • SELECT
  • DELETE
  • DROP TABLE

📘 Supported Data Types & Attributes

Types

  • INTEGER
  • FLOAT
  • BOOLEAN
  • TEXT

Attributes

  • NULL | NOT NULL

Example

CREATE TABLE User (
  id INTEGER,
  name TEXT NULL,
  valid BOOLEAN
);

📙 Supported SQL Syntax Keywords

Join (only with ON keyword)

  • INNER JOIN | JOIN
  • LEFT JOIN | LEFT OUTER JOIN

Example

SELECT * FROM TableA
JOIN TableB ON TableB.a_id = TableA.id
WHERE TableA.id > 10;

NestedSelect

Example

SELECT * FROM User
WHERE User.id IN (SELECT id IN Other);

Aggregation

  • COUNT
  • MAX
  • MIN
  • SUM
  • GROUP BY, HAVING

Example

SELECT
  COUNT(*),
  MAX(amount) + MIN(amount),
  SUM(amount)
FROM TableA
GROUP BY city
HAVING COUNT(*) > 10;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].