jEliDB (jDB) turns arrays of plain objects into something you can query, join, sync and validate with a SQL-inspired syntax — jQL — without giving up the JavaScript objects you already have.
Why jDB
insert, update, delete, select, batch and more — with join, where, limit, orderBy and groupBy clauses.
Write jQL as a plain string (-flag value or the newer
--flag=value), or hand jQl a plain JavaScript object directly —
no parsing involved.
Every jQL command declares the shape of its own fields, so a table name typed
"123" stays a string instead of silently becoming a number.
Move data in and out as JSON, JQL, CSV or HTML, table-by-table or for the whole database.
Push local changes to a backend and keep tables in sync on your schedule, not just on page load.
jQL commands are plugins — register your own with a declared schema and they get validation, both syntaxes and object-form calls for free.
A quick taste of jQL
insert -{"name":"Ada","role":"admin"} -users -ignoreSync
insert --data={"name":"Ada","role":"admin"} --table=users --ignoreSync
Both run through the same plugin and the same schema — jDB detects which syntax you used per call, so nothing you've already written needs to change. See the jQL reference for the full syntax, including the field-type system.
Installation
npm install jelidb
<script src="https://unpkg.com/jelidb@[version]/dist/jdb.min.js"></script>