Skip to content

Commit

Permalink
docs: add schema instances full_pkg parameter
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Sep 6, 2024
1 parent 9658761 commit e113c7e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/reference/lang/spec/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,8 @@ Suppose there are schemas a, b, and c, where c inherits b and b inherits a. Sche
Built-in function and members of schema
- instances()
Return the list of existing instances of a schema.
- instances(full_pkg: bool = False)
Return the list of existing instances of a schema in the main package. When the `full_pkg` is set `True`, return all schema instances in the whole program.
### Irrelevant Order Calculation
Expand Down
5 changes: 3 additions & 2 deletions docs/reference/lang/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -2341,8 +2341,9 @@ Note that the current version of KCL does not yet support user-defined decorator

Built-in functions and members of schema

- instances()
Return the list of existing instances of a schema.
- instances(full_pkg: bool = False)
Return the list of existing instances of a schema in the main package. When the `full_pkg` is set `True`, return all schema instances in the whole program.


```python
schema Person:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,8 @@ Suppose there are schemas a, b, and c, where c inherits b and b inherits a. Sche
Built-in function and members of schema
- instances()
Return the list of existing instances of a schema.
- instances(full_pkg: bool = False)
Return the list of existing instances of a schema in the main package. When the `full_pkg` is set `True`, return all schema instances in the whole program.
### Irrelevant Order Calculation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2291,8 +2291,8 @@ schema Person:

内置函数和 schema 成员

- instances()
返回 schema 的现有实例列表。
- instances(full_pkg: bool = False)
返回 schema 的现有实例列表,当 `full_pkg` 设置为 `False` 时,仅返回 main 中的 schema 实例,当 `full_pkg` 设置为 `True` 时,返回整个项目对应 schema 的所有实例

```python
schema Person:
Expand Down

0 comments on commit e113c7e

Please sign in to comment.