@immutabl3/electron-db

1.0.1 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @immutabl3/electron-db

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • immutablellc