@immutabl3/electron-db
v1.0.1
Published
json database for electron
Downloads
1
Readme
electron-db
a simple in-memory, json-persisted database for electron
Based on electron-db, with a couple notable changes
- implements a promise-based API (instead of callbacks). this allows waiting for an operation to finish writing to the filesystem so that it's safe to exit your program
- holds data in-memory and saves to filesytem to prevent filesystem thrashing. this also drastically increases performance (while increasing memory usage)
- locks the database save location to
appdata
. this simplifies the API - favors empty returns and early exits to throw less errors
- uses modern js <3
Available methods:
insert(table, data)
get(table, key)
all(table)
query(table, query)
update(table, query, data)
search(table, columnOrKey, value)
delete(table, query)
count(table)