Answers for "lokijs save database indexed db"

0

lokijs save database indexed db

// SAVE : will save App/Key/Val as 'finance'/'test'/{serializedDb}
var idbAdapter = new LokiIndexedAdapter('finance');
var db = new loki('test', { adapter: idbAdapter });
var coll = db.addCollection('testColl');
coll.insert({test: 'val'});
db.saveDatabase();  // could pass callback if needed for async complete
Posted by: Guest on June-28-2021

Browse Popular Code Answers by Language