Skip to content
Dharmesh edited this page Oct 5, 2017 · 1 revision

DATABASE (SETUP)

DB.setup(databaseJSON).then(dbInst => console.log(dbInst));

To get DB instance

DB.getInst().

Return Promise

DB.getInst().databaseName.storeName.get()
	.then(result => console.log(result))
	.catch(error => console.error(error));

DATABASE (DELETE)

DB.getInst().databaseName.delete();

STORE

GET

ADD / UPDATE

DELETE

INDEXES

GET (String Index)

GET (Number Index)

UPDATE

DELETE

COLLECTION

databaseName.storeName.getDist('index').then(result => result.count()) 
databaseName.storeName.getDist('index').then(result => result.avg('index'))
databaseName.storeName.get('index').then(result => result.min('index'))
databaseName.storeName.get('index').then(result => result.max('index'))