0.12.4 • Published 8 years ago

waterline-leancloud v0.12.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

image_squidhome@2x.png

NPM version Build Status Dependency Status Test Coverage Downloads Code Climate Issue Count

waterline-leancloud

Waterline 中间件, 支持 leancloud 数据库,已全部通过 waterline 的测试!

Waterline

https://github.com/balderdashy/waterline-docs 1. 支持主流关系数据库和文档数据库 2. 弱化了数据库之间的差异 3. 用一种对象的查询方式搞定多种数据库 4. 项目移植变的更容易 5. 支持20几种增删查改的方式 内置 schema 验证

test

在项目根目录建立 leancloudKey.js 内容如下

module.exports = {
     appId: "your appId",
     appKey: "your appKey",
     masterKey: "your masterKey"
 };

因为leancloud 没有“删除整个数据表”的接口, 有部分数据集会写入数字和字符串两种类型(实际使用不会出现),所以需要设置 类型为 any

1. driver_taxis__taxi_drivers 表 taxi_drivers 类型为 any
2. paymentbelongsTable 表 customer_belongs 类型为 any
$ npm test

Install

$ npm install waterline-leancloud

Configuration

config: {
     appId: "your appId",
     appKey: "your appKey",
     masterKey: "your masterKey"
    }

License

MIT