📜  lokijs 保存数据库索引数据库 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:08.544000             🧑  作者: Mango

代码示例1
// 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