database-js-localstorage
Database-js interface for Web Browser Local Storage
About
Database-js-localstorage is a database-js driver which uses the web browser local storage as the backend. It supports table creation, selects, inserts, deletes, and updates. Selects can use inner, left and right joins. Outer joins are not yet supported by the SQL parser. It supports schemas, the default schema is called "public".
Database-js-localstorage includes a very basic localstorage implementation for NodeJS. It saves to and reads from a file called "localstorage.json";
Install
npm install database-js database-js-localstorage
Usage:
var Connection = Connection; async { let connection statement rows; connection = 'localstorage:///[database-name]'; try statement = await connection; rows = await statement; console; catch error console; finally await connection; };
In the browser, you have to load the database-js-localstorage driver yourself and pass it to the Connection class:
var Connection = Connection;var Driver = ; async { let connection statement rows; connection = 'localstorage:///[database-name]' Driver; try statement = await connection; rows = await statement; console; catch error console; finally await connection; };
License
MIT (c) mlaanderson