Skip to content
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions doc/4_godelscript_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,16 @@ GödelScript 包含基础类型`int` `string`,`bool`属于基础类型,但
| eq | (bool, bool) -> bool | 相等。 |
| ne | (bool, bool) -> bool | 不相等。 |

#### 作用于集合的 native 函数
#### 作用于集合的 native 函数 (Aggregator)

作用于集合的 native 函数,或者称作 aggregator,如下所示:

| 函数 | 类型 | 解释 |
| --- | --- | --- |
| len | (*T) -> int | 获取数据集合的数量。 |
| max | (*int) -> int | 查找最大值。 |
| min | (*int) -> int | 查找最小值。 |
| sum | (*int) -> int | 求和。 |
| sum | (*int) -> int | 集合求和。 |
| find | (*T0) -> T1 | 从一个集合中,通过主键查找数据。 |

#### 全局 native 函数
Expand Down
31 changes: 31 additions & 0 deletions doc/6_coref_library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# COREF Library Reference

## coref::go

- coref::go [database](./coref-library/go/database.md)
- coref::go [function](./coref-library/go/function.md)
- coref::go [schema](./coref-library/go/schema.md)

## coref::java

- coref::java [database](./coref-library/java/database.md)
- coref::java [function](./coref-library/java/function.md)
- coref::java [schema](./coref-library/java/schema.md)

## coref::javascript

- coref::javascript [database](./coref-library/javascript/database.md)
- coref::javascript [function](./coref-library/javascript/function.md)
- coref::javascript [schema](./coref-library/javascript/schema.md)

## coref::python

- coref::python [database](./coref-library/python/database.md)
- coref::python [function](./coref-library/python/function.md)
- coref::python [schema](./coref-library/python/schema.md)

## coref::xml

- coref::xml [database](./coref-library/xml/database.md)
- coref::xml [function](./coref-library/xml/function.md)
- coref::xml [schema](./coref-library/xml/schema.md)
61 changes: 61 additions & 0 deletions doc/coref-library/go/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Database of coref.go.gdl

## GoDB

* variadic: [*VariadicDO](./schema/VariadicDO.md)
* uses: [*UsesDO](./schema/UsesDO.md)
* underlying_type: [*UnderlyingTypeDO](./schema/UnderlyingTypeDO.md)
* un_extracted: [*UnExtractedDO](./schema/UnExtractedDO.md)
* typeiadic: [*TypeiadicDO](./schema/TypeiadicDO.md)
* type_param_decls: [*TypeParamDeclsDO](./schema/TypeParamDeclsDO.md)
* type_object: [*TypeObjectDO](./schema/TypeObjectDO.md)
* type_param: [*TypeParamDO](./schema/TypeParamDO.md)
* type_name: [*TypeNameDO](./schema/TypeNameDO.md)
* type: [*TypeDO](./schema/TypeDO.md)
* scope: [*ScopeDO](./schema/ScopeDO.md)
* runtime_info: [*RuntimeInfoDO](./schema/RuntimeInfoDO.md)
* mod_require: [*ModRequireDO](./schema/ModRequireDO.md)
* comment_group: [*CommentGroupDO](./schema/CommentGroupDO.md)
* container_parent: [*ContainerParentDO](./schema/ContainerParentDO.md)
* stmt: [*StmtDO](./schema/StmtDO.md)
* file: [*FileDO](./schema/FileDO.md)
* mod_file: [*ModFileDO](./schema/ModFileDO.md)
* decl: [*DeclDO](./schema/DeclDO.md)
* mod_expr: [*ModExprDO](./schema/ModExprDO.md)
* expr: [*ExprDO](./schema/ExprDO.md)
* method_receiver: [*MethodReceiverDO](./schema/MethodReceiverDO.md)
* method_host: [*MethodHostDO](./schema/MethodHostDO.md)
* diagnostic_for: [*DiagnosticForDO](./schema/DiagnosticForDO.md)
* location: [*LocationDO](./schema/LocationDO.md)
* key_type: [*KeyTypeDO](./schema/KeyTypeDO.md)
* has_ellipsis: [*HasEllipsisDO](./schema/HasEllipsisDO.md)
* object: [*ObjectDO](./schema/ObjectDO.md)
* mod_token: [*ModTokenDO](./schema/ModTokenDO.md)
* field_struct: [*FieldStructDO](./schema/FieldStructDO.md)
* compilation_args: [*CompilationArgsDO](./schema/CompilationArgsDO.md)
* const_value: [*ConstValueDO](./schema/ConstValueDO.md)
* spec: [*SpecDO](./schema/SpecDO.md)
* scope_node: [*ScopeNodeDO](./schema/ScopeNodeDO.md)
* literal: [*LiteralDO](./schema/LiteralDO.md)
* element_type: [*ElementTypeDO](./schema/ElementTypeDO.md)
* doc_comment: [*DocCommentDO](./schema/DocCommentDO.md)
* diagnostic: [*DiagnosticDO](./schema/DiagnosticDO.md)
* compilation: [*CompilationDO](./schema/CompilationDO.md)
* pkg: [*PkgDO](./schema/PkgDO.md)
* error: [*ErrorDO](./schema/ErrorDO.md)
* file_data: [*FileDataDO](./schema/FileDataDO.md)
* scope_nesting: [*ScopeNestingDO](./schema/ScopeNestingDO.md)
* def: [*DefDO](./schema/DefDO.md)
* component_type: [*ComponentTypeDO](./schema/ComponentTypeDO.md)
* number_of_line: [*NumberOfLineDO](./schema/NumberOfLineDO.md)
* folder: [*FolderDO](./schema/FolderDO.md)
* fields: [*FieldsDO](./schema/FieldsDO.md)
* compilation_compiling_file: [*CompilationCompilingFileDO](./schema/CompilationCompilingFileDO.md)
* array_length: [*ArrayLengthDO](./schema/ArrayLengthDO.md)
* object_scope: [*ObjectScopeDO](./schema/ObjectScopeDO.md)
* has_location: [*HasLocationDO](./schema/HasLocationDO.md)
* comment: [*CommentDO](./schema/CommentDO.md)
* object_type: [*ObjectTypeDO](./schema/ObjectTypeDO.md)
* base_type: [*BaseTypeDO](./schema/BaseTypeDO.md)
* type_of: [*TypeOfDO](./schema/TypeOfDO.md)
* compilation_finished: [*CompilationFinishedDO](./schema/CompilationFinishedDO.md)
7 changes: 7 additions & 0 deletions doc/coref-library/go/function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Global Function of coref.go.gdl

## getSignatureByName

```rust
pub fn getSignatureByName(name: string) -> string;
```
100 changes: 100 additions & 0 deletions doc/coref-library/go/schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Schema of coref.go.gdl

* [Pkg](./schema/Pkg.md)
* [DocComment](./schema/DocComment.md)
* [TypeiadicDO](./schema/TypeiadicDO.md)
* [CommentGroup](./schema/CommentGroup.md)
* [File](./schema/File.md)
* [VarDecl](./schema/VarDecl.md)
* [PkgDO](./schema/PkgDO.md)
* [ConstDecl](./schema/ConstDecl.md)
* [Expr](./schema/Expr.md)
* [CommentGroupDO](./schema/CommentGroupDO.md)
* [WritesField](./schema/WritesField.md)
* [Writable](./schema/Writable.md)
* [GoFile](./schema/GoFile.md)
* [AssignmentStmt](./schema/AssignmentStmt.md)
* [TypeSpec](./schema/TypeSpec.md)
* [IncDecStmt](./schema/IncDecStmt.md)
* [LocalVaribleDecl](./schema/LocalVaribleDecl.md)
* [DiagnosticForDO](./schema/DiagnosticForDO.md)
* [RuntimeInfo](./schema/RuntimeInfo.md)
* [ValueSpec](./schema/ValueSpec.md)
* [Spec](./schema/Spec.md)
* [Node](./schema/Node.md)
* [Fields](./schema/Fields.md)
* [TypeDO](./schema/TypeDO.md)
* [FileDataDO](./schema/FileDataDO.md)
* [HasEllipsisDO](./schema/HasEllipsisDO.md)
* [Selector](./schema/Selector.md)
* [ObjectScopeDO](./schema/ObjectScopeDO.md)
* [VariadicDO](./schema/VariadicDO.md)
* [Decl](./schema/Decl.md)
* [UnderlyingTypeDO](./schema/UnderlyingTypeDO.md)
* [TypeOfDO](./schema/TypeOfDO.md)
* [TypeObjectDO](./schema/TypeObjectDO.md)
* [TypeNameDO](./schema/TypeNameDO.md)
* [Comment](./schema/Comment.md)
* [ForStmt](./schema/ForStmt.md)
* [ScopeNodeDO](./schema/ScopeNodeDO.md)
* [ModRequireDO](./schema/ModRequireDO.md)
* [ScopeDO](./schema/ScopeDO.md)
* [RuntimeInfoDO](./schema/RuntimeInfoDO.md)
* [ModExprDO](./schema/ModExprDO.md)
* [FieldsDO](./schema/FieldsDO.md)
* [LocationDO](./schema/LocationDO.md)
* [LiteralDO](./schema/LiteralDO.md)
* [TypeParamDeclsDO](./schema/TypeParamDeclsDO.md)
* [KeyTypeDO](./schema/KeyTypeDO.md)
* [Receiver](./schema/Receiver.md)
* [ObjectDO](./schema/ObjectDO.md)
* [MethodReceiverDO](./schema/MethodReceiverDO.md)
* [Method](./schema/Method.md)
* [DefineStmt](./schema/DefineStmt.md)
* [DocCommentDO](./schema/DocCommentDO.md)
* [ModFileDO](./schema/ModFileDO.md)
* [ReturnStmt](./schema/ReturnStmt.md)
* [StmtDO](./schema/StmtDO.md)
* [BaseTypeDO](./schema/BaseTypeDO.md)
* [MethodHostDO](./schema/MethodHostDO.md)
* [ComponentTypeDO](./schema/ComponentTypeDO.md)
* [FolderDO](./schema/FolderDO.md)
* [Statement](./schema/Statement.md)
* [ExprDO](./schema/ExprDO.md)
* [SliceExpr](./schema/SliceExpr.md)
* [ErrorDO](./schema/ErrorDO.md)
* [ElementTypeDO](./schema/ElementTypeDO.md)
* [TypeName](./schema/TypeName.md)
* [DefDO](./schema/DefDO.md)
* [ObjectTypeDO](./schema/ObjectTypeDO.md)
* [DeclDO](./schema/DeclDO.md)
* [Location](./schema/Location.md)
* [Variables](./schema/Variables.md)
* [CallableExpr](./schema/CallableExpr.md)
* [FieldStructDO](./schema/FieldStructDO.md)
* [ConstValueDO](./schema/ConstValueDO.md)
* [ContainerParentDO](./schema/ContainerParentDO.md)
* [CompilationFinishedDO](./schema/CompilationFinishedDO.md)
* [TypeParamDO](./schema/TypeParamDO.md)
* [FileData](./schema/FileData.md)
* [IOTALiteral](./schema/IOTALiteral.md)
* [Type](./schema/Type.md)
* [CompilationCompilingFileDO](./schema/CompilationCompilingFileDO.md)
* [CompilationDO](./schema/CompilationDO.md)
* [DiagnosticDO](./schema/DiagnosticDO.md)
* [ScopeNestingDO](./schema/ScopeNestingDO.md)
* [NumberOfLineDO](./schema/NumberOfLineDO.md)
* [Mod](./schema/Mod.md)
* [ModTokenDO](./schema/ModTokenDO.md)
* [ImportSpec](./schema/ImportSpec.md)
* [HasLocationDO](./schema/HasLocationDO.md)
* [UnExtractedDO](./schema/UnExtractedDO.md)
* [FileDO](./schema/FileDO.md)
* [UsesDO](./schema/UsesDO.md)
* [Literal](./schema/Literal.md)
* [ArrayLengthDO](./schema/ArrayLengthDO.md)
* [CommentDO](./schema/CommentDO.md)
* [SelectorExpr](./schema/SelectorExpr.md)
* [SpecDO](./schema/SpecDO.md)
* [CompilationArgsDO](./schema/CompilationArgsDO.md)
* [Function](./schema/Function.md)
52 changes: 52 additions & 0 deletions doc/coref-library/go/schema/ArrayLengthDO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# ArrayLengthDO

Primary key: `oid: int`

```rust
schema ArrayLengthDO {
len: int,
file_id: int,
tp: int,
@primary oid: int
}
```
## ArrayLengthDO::getLen

```java
/**
* @brief gets the len of this element.
* @return int
*/
```
```rust
pub fn getLen(self: ArrayLengthDO) -> int;
```
## ArrayLengthDO::getFileId

```java
/**
* @brief gets the file id of this element.
* @return int
*/
```
```rust
pub fn getFileId(self: ArrayLengthDO) -> int;
```
## ArrayLengthDO::getTp

```java
/**
* @brief gets the tp of this element.
* @return int
*/
```
```rust
pub fn getTp(self: ArrayLengthDO) -> int;
```
## ArrayLengthDO::\_\_all\_\_

Data constraint method.

```rust
pub fn __all__(db: GoDB) -> *ArrayLengthDO;
```
Loading