Update book

This commit is contained in:
Sunli 2021-11-19 08:29:45 +08:00
parent 892e8189a0
commit ff64396fc8
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ impl Query {
## Selection / LookAhead
Sometimes you want to know what fields are requested in the subquery to optimize the processing of data. You can read fields accross the query with `ctx.fields()` which will give you a `SelectionField` which will allow you to navigate accross the fields and subfields.
Sometimes you want to know what fields are requested in the subquery to optimize the processing of data. You can read fields accross the query with `ctx.field()` which will give you a `SelectionField` which will allow you to navigate accross the fields and subfields.
If you want to perform a search accross the query or the subqueries, you do not have to do this by hand with the `SelectionField`, you can use the `ctx.look_ahead()` to perform a selection

View File

@ -94,7 +94,7 @@ impl Query {
## Selection / LookAhead
有时你想知道子查询中请求了哪些字段用于优化数据处理,则可以使用`ctx.fields()`读取查询中的字段,它将提供一个`SelectionField`,允许你在当前字段和子字段之间导航。
有时你想知道子查询中请求了哪些字段用于优化数据处理,则可以使用`ctx.field()`读取查询中的字段,它将提供一个`SelectionField`,允许你在当前字段和子字段之间导航。
如果要跨查询或子查询执行搜索,则不必使用 `SelectionField` 手动执行此操作,可以使用 `ctx.look_ahead()` 来执行选择。