提交 ba81e8d9 编写于 作者: 雪洛's avatar 雪洛

docs: update jql

上级 42fbe6fe
......@@ -141,6 +141,74 @@ sql写法,对js工程师而言有学习成本,而且无法处理非关系型
- 为了数据校验能严格限制,更新数据库时不可使用更新操作符`db.command.inc`
- 更新数据时键值不可使用`{'a.b.c': 1}`的形式,需要写成`{a:{b:{c:1}}}`形式
## JQL方法使用限制
### 简单查询
下面这些方法必须严格按照下面的顺序进行调用,其他方法需要在这些方法之后调用(不限制顺序)
```
collection
aggregate
doc
where
field
groupBy
groupField
```
### 联表查询
临时表可以使用以下方法(需按照下面的顺序调用)
```
collection
where
field
orderBy
skip
limit
getTemp
```
虚拟联表可以使用以下方法(需按照下面的顺序调用)
```
collection
foreignKey
where
field
groupBy
groupField
distinct
orderBy
skip
limit
get
```
### 新增
仅允许`collection().add()`这样的形式
### 修改
仅允许以下两种形式
```js
db.collection('xx').doc('xxx').update({})
db.collection('xx').where('xxxx').update({})
```
### 删除
仅允许以下两种形式
```js
db.collection('xx').doc('xxx').remove()
db.collection('xx').where('xxxx').remove()
```
## jql语句内云端环境变量@variable
|参数名 |说明 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册