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

docs:补充部分示例中缺少的 const _ = db.command

上级 a9434e14
......@@ -557,6 +557,7 @@ collection.where().remove()
```js
// 删除字段a的值大于2的文档
const _ = db.command
collection.where({
a: _.gt(2)
}).remove().then(function(res) {
......@@ -591,6 +592,7 @@ collection.doc('doc-id').set({
collection.update()
```js
const _ = db.command
collection.where({name: _.eq('hey')}).update({
age: 18,
}).then(function(res) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册