Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY authored Sep 29, 2024
1 parent 16181e5 commit e1b2dc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 9 additions & 9 deletions content/en/docs/kitex/Tutorials/advanced-feature/fieldmask.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ Here are basic hypothesis:

Here is detailed syntax:

- ThriftPath | Description
- -- | --
- $ | the root object,every path must start with it.
- .fieldname | get the child field of a struct corepsonding to fieldname. For example, $.FieldA.ChildrenB
- [index,index...] | get any number of elements in an List/Set corepsonding to indices. Indices must be integer.For example: $.FieldList[1,3,4] .Notice: a index beyond actual list size can written but is useless.
- {"key","key"...} | get any number of values corepsonding to key in a string-typed-key map. For example: $.StrMap{"abcd","1234"}
- {id,id...} | get the child field with specific id in a integer-typed-key map. For example, $.IntMap{1,2}
- * | get ALL fields/elements, that is: $.StrMap{*}.FieldX means gets all the elements' FieldX in a map Root.StrMap; $.List[*].FieldX means get all the elements' FieldX in a list Root.List.
-
ThriftPath | Description
-- | --
$ | the root object,every path must start with it.
.fieldname | get the child field of a struct corepsonding to fieldname. For example, $.FieldA.ChildrenB
[index,index...] | get any number of elements in an List/Set corepsonding to indices. Indices must be integer.For example: $.FieldList[1,3,4] .Notice: a index beyond actual list size can written but is useless.
{"key","key"...} | get any number of values corepsonding to key in a string-typed-key map. For example: $.StrMap{"abcd","1234"}
{id,id...} | get the child field with specific id in a integer-typed-key map. For example, $.IntMap{1,2}
* | get ALL fields/elements, that is: $.StrMap{*}.FieldX means gets all the elements' FieldX in a map Root.StrMap; $.List[*].FieldX means get all the elements' FieldX in a list Root.List.


#### **Agreement Of Implementation**

Expand Down
17 changes: 8 additions & 9 deletions content/zh/docs/kitex/Tutorials/advanced-feature/fieldmask.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@ ThriftPath `$.Foo` 表示 Example.Foo 的字符串值,`$.Self.Bar` 表示第

这是详细的语法:

- ThriftPath | Description
- -- | --
- $ | 根对象,每个路径都必须以它开头。
- .`fieldname` | 获取结构体中的 fieldname 子字段。例如,$. Fielda.ChildrenB。如果 fieldname 是路径终点且改字段为复杂类型(map/list/struct),则表示获取该字段下的所有子字- 段。
- [`index`,`index`...] | 获取 List 中的特定 index 的元素。索引必须是整数。例如:$. FieldList[1,3,4]。注意:可以编写超出实际列表大小的索引,但是实际无用。
- {"`key`","`key`"...} | 获取字符串类型键的映射中的特定 key 的值。例如:$. StrMap{""abcd"",""1234""}
- {`id`,`id`...} | 获取整数类型键的映射中具有特定 id 的子字段。例如,$.IntMap{1,2}
- \* | 获取所有字段/元素,即:$. StrMap{*} 表示获取映射 Root.StrMap 所有元素;$.List[*] 表示或者 List 中的所有元素。
-
ThriftPath | Description
-- | --
$ | 根对象,每个路径都必须以它开头。
.`fieldname` | 获取结构体中的 fieldname 子字段。例如,$. Fielda.ChildrenB。如果 fieldname 是路径终点且改字段为复杂类型(map/list/struct),则表示获取该字段下的所有子字段。
[`index`,`index`...] | 获取 List 中的特定 index 的元素。索引必须是整数。例如:$. FieldList[1,3,4]。注意:可以编写超出实际列表大小的索引,但是实际无用。
{"`key`","`key`"...} | 获取字符串类型键的映射中的特定 key 的值。例如:$. StrMap{""abcd"",""1234""}
{`id`,`id`...} | 获取整数类型键的映射中具有特定 id 的子字段。例如,$.IntMap{1,2}
\* | 获取所有字段/元素,即:$. StrMap{*} 表示获取映射 Root.StrMap 所有元素;$.List[*] 表示或者 List 中的所有元素。

#### **类型描述符**

Expand Down

0 comments on commit e1b2dc2

Please sign in to comment.