Skip to content

Commit

Permalink
init selection api
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Sep 10, 2023
1 parent a5922f1 commit 1b68dc4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .vitepress/config/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@
{
"text": "求值表达式 (Eval)",
"link": "/api/database/evaluation.md"
},
{
"text": "查询构造器 (Selection)",
"link": "/api/database/selection.md"
}
]
},
Expand Down
19 changes: 19 additions & 0 deletions zh-CN/api/database/selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 查询构造器 (Selection)

## 实例方法

### selection.where(query)

### selection.orderBy(key, order?)

### selection.limit(count)

### selection.offset(count)

### selection.project(fields)

### selection.groupBy(fields, extra?)

### selection.having(query)

### selection.execute(expr?)
2 changes: 1 addition & 1 deletion zh-CN/guide/database/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ctx.database.select('foo')
.execute()
```

这里的 `$.gt()` 是一个求值表达式。你可以在 [这里](../../api/database/eval.md) 看到完整的求值表达式 API。
这里的 `$.gt()` 是一个求值表达式。你可以在 [这里](../../api/database/evaluation.md) 看到完整的求值表达式 API。

## 字段映射

Expand Down

0 comments on commit 1b68dc4

Please sign in to comment.