jSQL is a partial yet robust SQL implementation with features specific to Javascript. jSQL is based on mySQL, but does not implement the entire standard, for example, JOIN
statements are not yet possible with jSQL but it can run without a server and store Javascript Dates and Functions.
jSQL is completely hand written and has no dependencies.
Download the jSQL.js file from Github or use npm
npm install jsql-official
For use in a browser, just include the jSQL.js file in a <script>
tag. In this case, you can use the CDN:
https://gitcdn.xyz/repo/Pamblam/jSQL/master/jSQL.min.js
For use in a Node environment, require it like so:
var jSQL = require("jSQL.js");
At the Lowest level, jSQL automatically chooses the best method of storage to save state and interacts directly with it. This layer exposes a persistence method, jSQL.commit()
, which is called to serialize and store all data currently in the jSQL database on the user's hard drive. While the app is open and loaded in the browser, this data is serialized and stored within reach in the jSQL.tables
object where the library is able to perform operations on it.
In the middle, a set of methods are used to build jSQLQuery
objects which execute CRUD commands on the jSQL database and it's tables. (See: jSQL.createTable()
, jSQL.select()
, jSQL.insertInto()
, jSQL.dropTable()
, jSQL.update()
, and jSQL.deleteFrom()
)
At the highest level, jSQL is an SQL engine (hence the name: Javascript Query Language) which understands a subset of MySQL passed to the jSQL.query()
method, which parses a jSQL statement and uses the above methods to create jSQLQuery
objects to perform operations on the database.
jSQL is written with flexibility, ease of use, and efficiency in mind. It supports prepared statements, column typing, and can store any kind of data you need it to, including functions and instances of custom objects. It's applications include caching server-sourced data, state persistence, data management and querying and more.
A handy tool if you're writing apps with jSQL.
jSQL is actively updated and maintained. jSQL was last updated ... ago.