jugglingdb pouchdb adapter PouchDB数据库的适配器
jugglingdb-pouchdb-adapter是一个适配器,使使用变得容易。用法初始化数据库,然后定义你的模型:schema = new Schema('pouchdb-adapter', dbName: 'pouchdb')
。定义模型 Note
:Note = schema.define('Note', id: String, title: String, content: String, creationDate: Date)
。
-
查询记录是否存在:
Note.exists(123, (err, isExist) -> console.log(isExist))
-
查找记录:
Note.find(321, (err, note) -> console.log(note))
-
创建记录:
Note.create({...})
下载地址
用户评论