Skip to content

Commit e97e72b

Browse files
authored
Merge pull request #464 from Peefy/docs-schema-instances-full-pkg-para
docs: add schema instances full_pkg parameter
2 parents b14cc76 + e113c7e commit e97e72b

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

docs/reference/lang/spec/schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,8 @@ Suppose there are schemas a, b, and c, where c inherits b and b inherits a. Sche
816816
817817
Built-in function and members of schema
818818
819-
- instances()
820-
Return the list of existing instances of a schema.
819+
- instances(full_pkg: bool = False)
820+
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.
821821
822822
### Irrelevant Order Calculation
823823

docs/reference/lang/tour.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,8 +2341,9 @@ Note that the current version of KCL does not yet support user-defined decorator
23412341

23422342
Built-in functions and members of schema
23432343

2344-
- instances()
2345-
Return the list of existing instances of a schema.
2344+
- instances(full_pkg: bool = False)
2345+
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.
2346+
23462347

23472348
```python
23482349
schema Person:

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/spec/schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,8 @@ Suppose there are schemas a, b, and c, where c inherits b and b inherits a. Sche
816816
817817
Built-in function and members of schema
818818
819-
- instances()
820-
Return the list of existing instances of a schema.
819+
- instances(full_pkg: bool = False)
820+
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.
821821
822822
### Irrelevant Order Calculation
823823

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,8 +2291,8 @@ schema Person:
22912291

22922292
内置函数和 schema 成员
22932293

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

22972297
```python
22982298
schema Person:

0 commit comments

Comments
 (0)