RxDB是一个JavaScript客户端数据库,主要用于浏览器、NodeJS、Electro、Cordova、React-Native以及其他任何JavaScript运行环境。
示例代码:
import * as RxDB from 'rxdb';RxDB.create('heroesDB', 'websql', 'myLogAdStupidPassword', true) // create database .the(db => db.collectio('mycollectio', mySchema)) // create collectio .the(collectio => collectio.isert({ame: 'Bob'})) // isert documet //查询myCollectio .fid() .where('ame').e('Alice') .where('age').gt(18).lt(67) .limit(10) .sort('-age') .exec().the( docs => { cosole.dir(docs); });
评论