MemDB; simple, fast and pure Javascript in memory database for Node JS.
22 Jul 2017This lightweight engine can be used in place of things like LevelDB, Redis while keeping things light and very simple. Internaly, memDB uses json as storage format with an opt-in support for encryption.
In order to achieve performance, memdb keeps things in a staging area for fast access. No worries, every booking is handled for you :). We are developers too, thus we hate keeping tract of things.
Quick start
MemDB’s API is pretty simple and straigth forward. all async action api return a promise.
version()
: Get MemDB current versionrevision()
: Get the current database revisionoptions()
: Get the database instance optionsput(keychain, value, loose)
: Save data in the databaseget(keychain, defaultValue)
: Get data from the databaseall()
: Get all data fron the databasedelete(keychain)
: Delete data from the database
NB: What the heck is keychain ?
keychain is a concatenation of multiple object keys to obtain a path for acessing an object property in a deep level. This is a convenient way of puting/getting deeply nestes object properties. The folowing keychain server.dev.host
means accessing the host
property form dev
object which is in turn available in the server
object as a property.
For more information, please head over MemDB