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

docs: uniCloud database orderBy

上级 1e5a5410
......@@ -353,6 +353,10 @@ collection.orderBy(field, orderType)
```js
let res = await collection.orderBy("name", "asc").get()
```
**注意**
- 排序字段存在多个重复的值时排序后的分页结果,可能会出现某条记录在上一页出现又在下一页出现的情况。这时候可以通过指定额外的排序条件比如`.orderBy("name", "asc").orderBy("_id", "asc")`来规避这种情况。
### 指定返回字段
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册