1. 首页
  2. 考试认证
  3. 其它
  4. jugglingdb pouchdb adapter PouchDB数据库的适配器

jugglingdb pouchdb adapter PouchDB数据库的适配器

上传者: 2024-10-16 13:59:48上传 ZIP文件 13.03KB 热度 11次

jugglingdb-pouchdb-adapter是一个适配器,使使用变得容易。用法初始化数据库,然后定义你的模型:schema = new Schema('pouchdb-adapter', dbName: 'pouchdb')。定义模型 NoteNote = 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({...})

下载地址
用户评论