in-memory adapter for crudlet - a library that makes it easy to persist data through multiple transports.
installation
npm install crudlet-memory
var crudlet = ;var memorydb = ; var db = ;; // streaming operationscrudlet;
db memorydb(options)
creates a local crudelt database
options
- options for the local dbname
- name of db (optional)store
- store to use
runs an operation
operation
- operation to run can be:insert
,remove
,update
, orload
options
- operation specific options
insert options:
data
- data to insert. Can be an object, or an array to insert multiple
remove options:
query
- mongodb search querymulti
- TRUE if you want to remove multiple items (false by default)
update options:
query
- mongodb search querymulti
- TRUE if you want to update multiple items (false by default)data
- data to set - this is merged with existing data
load options:
query
- mongodb search querymulti
- TRUE if you want to load multiple items (one by default)