sql.js is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser. You can try it in this online demo. It uses a virtual database file stored in memory, and thus doesn't persist the changes made to the database. However, it allows you to import any existing sqlite file, and to export the created database as a JavaScript typed array. sql.js uses emscripten to compile SQLite to webassembly (or to javascript code for compatibility with older browsers). It includes contributed math and string extension functions. sql.js can be used like any traditional JavaScript library. If you are building a native application in JavaScript (using Electron for instance), or are working in node.js, you will likely prefer to use a native binding of SQLite to JavaScript. A native binding will not only be faster because it will run native code, but it will also be able to work on database files directly instead of having to load the entire database.
Features
- SQLite is public domain, sql.js is MIT licensed
- The test files provide up to date example of the use of the api
- Create a database from a file chosen by the user
- Load a database from a server
- Use from node.js
- Read a database from the disk
-
Released /v1.13.0/sqljs-all.zip
-
Released /v1.13.0/worker.sql-asm.js
-
Released /v1.13.0/sqljs-worker-wasm.zip
-
Released /v1.13.0/sql.js
-
Released /v1.13.0/sqljs-wasm.zip