我正在尝试构建一个函数,在传递 keypath 之后检索商店中的下一个元素。我的 getItem 看起来像这样。
req = smartpigsdb.get(store, keypath);
req.done(function(record) {
if(record!==undefined || typeof record=='object'){
// do something with the record
}
else console.log('error getItem: ' + e);
});
req.fail(function(e) {
console.log(e);
});
如何使用 YDN-DB 实现这一目标?