Skip to main content
Version: 3.10

语言概览

分类概念概念标题JSON AST 示例文本化 NASLNatural TS
basics/typesTypeAnnotation类型标注Boolean 布尔值
{
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Boolean",
"inferred": false,
"ruleMap": {}
}
Boolean
Boolean
Integer 整数
{
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
Integer
Long
Decimal 小数
{
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Decimal",
"inferred": false,
"ruleMap": {}
}
Decimal
Decimal
String 字符串
{
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
String
String
basics/typesDatabaseTypeAnnotation数据库存储类型
{
"concept": "DatabaseTypeAnnotation",
"typeName": "decimal",
"arguments": {
"precision": "31"
}
}
@DatabaseTypeAnnotation(
typeName = "decimal",
arguments = [ "precision" -> "31" ],
)
basics/typesTypeParam类型参数
{
"concept": "TypeParam",
"name": "T"
}
T
T
basics/typesStructure数据结构
{
"concept": "Structure",
"name": "ProductOrder",
"description": "",
"properties": [
{
"concept": "StructureProperty",
"name": "product",
"label": "商品",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.dataSources.defaultDS.entities",
"typeName": "Product",
"inferred": false,
"ruleMap": {}
},
"jsonName": "",
"description": ""
},
{
"concept": "StructureProperty",
"name": "order",
"label": "订单",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.dataSources.defaultDS.entities",
"typeName": "OrderForm",
"inferred": false,
"ruleMap": {}
},
"jsonName": "",
"description": ""
},
{
"concept": "StructureProperty",
"name": "count",
"label": "数量",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"jsonName": "",
"description": ""
}
]
}
@(description = "")
struct ProductOrder {
@(
label = "商品",
description = "",
jsonName = "",
)
product: app::dataSources::defaultDS::entities::Product;

@(
label = "订单",
description = "",
jsonName = "",
)
order: app::dataSources::defaultDS::entities::OrderForm;

@(
label = "数量",
description = "",
jsonName = "",
)
count: Integer;
}
class ProductOrder {
product: Product;
order: OrderForm;
count: Long;
}
带描述的示例
{
"concept": "Structure",
"name": "ProductOrder",
"description": "表示商品订单的结构",
"properties": [
{
"concept": "StructureProperty",
"name": "product",
"label": "商品",
"description": "商品属性",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.dataSources.defaultDS.entities",
"typeName": "Product",
"inferred": false,
"ruleMap": {}
},
"jsonName": "product-"
},
{
"concept": "StructureProperty",
"name": "order",
"label": "订单",
"description": "订单属性",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.dataSources.defaultDS.entities",
"typeName": "OrderForm",
"inferred": false,
"ruleMap": {}
},
"jsonName": "order-"
},
{
"concept": "StructureProperty",
"name": "count",
"label": "数量",
"description": "订单中该商品的数量",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"jsonName": "count-",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "NumericLiteral",
"value": "120",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"playground": []
}
}
]
}
@(description = "表示商品订单的结构")
struct ProductOrder {
@(
label = "商品",
description = "商品属性",
jsonName = "product-",
)
product: app::dataSources::defaultDS::entities::Product;

@(
label = "订单",
description = "订单属性",
jsonName = "order-",
)
order: app::dataSources::defaultDS::entities::OrderForm;

@(
label = "数量",
description = "订单中该商品的数量",
jsonName = "count-",
)
count: Integer = 120;
}
class ProductOrder {
product: Product;
order: OrderForm;
count: Long;
}
{
"concept": "Structure",
"name": "ExtendedList",
"description": "",
"typeParams": [
{
"concept": "TypeParam",
"name": "T"
}
],
"properties": [
{
"concept": "StructureProperty",
"name": "length",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Integer",
"inferred": false,
"ruleMap": {}
},
"description": "",
"jsonName": ""
}
]
}
@(description = "")
struct ExtendedList<T> {
@(
description = "",
jsonName = "",
)
length: Integer;
}
class ExtendedList<T> {
length: Integer;
}
basics/typesStructureProperty数据结构属性
{
"concept": "StructureProperty",
"name": "count",
"label": "数量",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"description": "",
"jsonName": ""
}
@(
label = "数量",
description = "",
jsonName = "",
)
count: Integer
count: Long
{
"concept": "StructureProperty",
"name": "count",
"label": "数量",
"description": "订单中该商品的数量",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"jsonName": "count-",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "NumericLiteral",
"value": "120",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"playground": []
}
}
@(
label = "数量",
description = "订单中该商品的数量",
jsonName = "count-",
)
count: Integer = 120
count: Long
basics/typesEnum枚举
{
"concept": "Enum",
"name": "ProductStatus",
"label": "",
"description": "",
"valueType": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"enumItems": [
{
"concept": "EnumItem",
"value": "Listing",
"label": {
"concept": "StaticString",
"value": "上架"
}
},
{
"concept": "EnumItem",
"value": "Delisting",
"label": {
"concept": "StaticString",
"value": "下架"
}
}
]
}
@(
label = "",
description = "",
)
enum ProductStatus {
@(label = '上架')
case Listing;

@(label = '下架')
case Delisting;
}
enum ProductStatus {
'Listing' = '上架',
'Delisting' = '下架',
}
带描述的示例
{
"concept": "Enum",
"name": "ProductStatus",
"label": "商品状态",
"description": "表示商品状态的枚举",
"valueType": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"enumItems": [
{
"concept": "EnumItem",
"value": "Listing",
"label": {
"concept": "StaticString",
"value": "上架"
}
},
{
"concept": "EnumItem",
"value": "Delisting",
"label": {
"concept": "StaticString",
"value": "下架"
}
}
]
}
@(
label = "商品状态",
description = "表示商品状态的枚举",
)
enum ProductStatus {
@(label = '上架')
case Listing;

@(label = '下架')
case Delisting;
}
enum ProductStatus {
'Listing' = '上架',
'Delisting' = '下架',
}
basics/typesEnumItem枚举值带描述的示例
{
"concept": "EnumItem",
"value": "Listing",
"label": {
"concept": "StaticString",
"value": "上架"
}
}
@(label = '上架')
case Listing
'Listing' = '上架'
basics/typesMetadataType元数据类型
{
"concept": "MetadataType",
"name": "Currency",
"label": "货币",
"uuid": "83450632af284642ab5c967e82d49be4",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Decimal",
"inferred": false,
"ruleMap": {}
},
"rules": [
{
"concept": "ValidationRule",
"calleeNamespace": "nasl.validation",
"calleeName": "min",
"arguments": [
{
"concept": "Argument",
"keyword": "min",
"expression": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
],
"enableServerValidation": true
},
{
"concept": "ValidationRule",
"calleeNamespace": "nasl.validation",
"calleeName": "max",
"arguments": [
{
"concept": "Argument",
"keyword": "max",
"expression": {
"concept": "NumericLiteral",
"value": "99999999",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
],
"enableServerValidation": true
}
],
"playground": []
}
@(
label = "货币",
uuid = "83450632af284642ab5c967e82d49be4",
)
type Currency = Decimal {
expect min(0)(
enableServerValidation = true,
);
expect max(99999999)(
enableServerValidation = true,
);
}
type Currency = Decimal;
basics/literalsNullLiteral空字面量
{
"concept": "NullLiteral"
}
null
null
basics/literalsBooleanLiteral布尔型字面量
{
"concept": "BooleanLiteral",
"value": "true"
}
true
true
basics/literalsStringLiteral字符串字面量
{
"concept": "StringLiteral",
"value": "这是一段文本"
}
'这是一段文本'
'这是一段文本'
basics/literalsStringInterpolation字符串插值
{
"concept": "StringInterpolation",
"expressions": [
{
"concept": "StringLiteral",
"value": "总数:"
},
{
"concept": "Identifier",
"namespace": "",
"name": "total"
},
{
"concept": "StringLiteral",
"value": "\n价格:"
},
{
"concept": "Identifier",
"namespace": "",
"name": "price"
}
]
}
s"总数:${total}
价格:${price}"
`总数:${total}
价格:${price}`
basics/literalsStaticString静态字符串
{
"concept": "StaticString",
"value": "这是一段文本",
"i18nKey": "21daa460e9976a46d1b948c13f211550"
}
@(i18nKey = "21daa460e9976a46d1b948c13f211550")
'这是一段文本'
'这是一段文本'
basics/literalsNumericLiteral数字字面量
{
"concept": "NumericLiteral",
"value": "24",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeNamespace": "nasl.core",
"typeKind": "primitive",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
24
24
basics/expressionsCallFunction调用函数
{
"concept": "CallFunction",
"label": "调用逻辑",
"calleeNamespace": "nasl.util",
"calleeName": "Clone",
"arguments": [
{
"concept": "Argument",
"keyword": "obj",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
}
]
}
nasl::util::Clone(student)
nasl.util.Clone(student)
带 lambda 的入参
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "ListFilter",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
},
{
"concept": "Argument",
"keyword": "by",
"expression": {
"concept": "AnonymousFunction",
"params": [
{
"concept": "Param",
"name": "item",
"description": ""
}
],
"body": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "productReport"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "executed"
}
},
"right": {
"concept": "NullLiteral"
},
"operator": "!="
}
}
}
]
}
nasl::util::ListFilter(list, { item: String => item.productReport.executed != null })
nasl.util.ListFilter(list, (item: String) => item.productReport.executed != null)
basics/expressionsValidationRule验证规则
{
"concept": "ValidationRule",
"calleeNamespace": "nasl.validation",
"calleeName": "maxLength",
"arguments": [
{
"concept": "Argument",
"keyword": "max",
"expression": {
"concept": "NumericLiteral",
"value": "100",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
],
"enableServerValidation": true
}
expect maxLength(100)(
enableServerValidation = true,
)
nasl.validation.maxLength(100)
{
"concept": "ValidationRule",
"calleeNamespace": "nasl.validation",
"calleeName": "maxLength",
"arguments": [
{
"concept": "Argument",
"keyword": "max",
"expression": {
"concept": "NumericLiteral",
"value": "100",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
],
"errorMessage": {
"concept": "StringLiteral",
"value": "格式不正确"
},
"target": {
"concept": "Identifier",
"namespace": "",
"name": "param1"
},
"enableServerValidation": true
}
expect maxLength(100)(
enableServerValidation = true,
errorMessage = '格式不正确',
target = param1,
)
nasl.validation.maxLength(100)
basics/expressionsIdentifier标识符
{
"concept": "Identifier",
"namespace": "",
"name": "student"
}
student
student
枚举标识符
{
"concept": "Identifier",
"namespace": "app.enums",
"name": "StatusEnum"
}
app::enums::StatusEnum
app.enums.StatusEnum
basics/expressionsBinaryExpression二元表达式
{
"concept": "BinaryExpression",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "ratio"
},
"operator": "*",
"right": {
"concept": "NumericLiteral",
"value": "100",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
ratio * 100
ratio * 100
{
"concept": "BinaryExpression",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "ratio"
},
"operator": "==",
"right": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
ratio == 1
ratio == 1
{
"concept": "BinaryExpression",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "condition1"
},
"operator": "||",
"right": {
"concept": "BinaryExpression",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "ratio"
},
"operator": ">",
"right": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
}
condition1 || ratio > 1
condition1 || ratio > 1
数据查询中的二元表达式
{
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "Student",
"propertyName": "fullName",
"asName": ""
},
"right": {
"concept": "Identifier",
"namespace": "",
"name": "name"
},
"operator": "like"
}
LIKE(Student.fullName, name)
LIKE(Student.fullName, name)
basics/expressionsMatchCase匹配分支
{
"concept": "MatchCase",
"patterns": [
{
"concept": "BooleanLiteral",
"value": "true"
}
],
"body": [
{
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
],
"isMatchedTypeEnumable": true
}
true => {
1
}
1
{
"concept": "MatchCase",
"patterns": [],
"body": [],
"isMatchedTypeEnumable": false
}
_ => {
}
basics/expressionsMatch匹配
{
"concept": "Match",
"expression": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "productReport"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "executed"
}
},
"isExpression": true,
"cases": [
{
"concept": "MatchCase",
"patterns": [
{
"concept": "BooleanLiteral",
"value": "true"
}
],
"body": [
{
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
],
"isMatchedTypeEnumable": true
},
{
"concept": "MatchCase",
"patterns": [
{
"concept": "BooleanLiteral",
"value": "false"
}
],
"body": [
{
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
],
"isMatchedTypeEnumable": true
},
{
"concept": "MatchCase",
"patterns": [],
"body": [],
"isMatchedTypeEnumable": false
}
]
}
match item.productReport.executed {
true => 1
false => 0
}
(function match(_value) {
if (item.productReport.executed === true) {
return 1
} else if (item.productReport.executed === false) {
return 0
} else {
}
})(item.productReport.executed)
basics/expressionsUnaryExpression一元表达式
{
"concept": "UnaryExpression",
"operator": "!",
"argument": {
"concept": "Identifier",
"namespace": "",
"name": "condition"
}
}
!condition
!(condition)
数据查询中的一元表达式
{
"concept": "UnaryExpression",
"operator": "isNull",
"argument": {
"concept": "Identifier",
"namespace": "",
"name": "condition"
}
}
(condition) === null
((condition) === null)
basics/expressionsMemberExpression成员表达式
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "student"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
}
student.name
student.name
{
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
}
item.student.name
item.student.name
枚举标识符
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "app.enums",
"name": "Status"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "Normal"
}
}
app::enums::Status::Normal
app.enums.Status['Normal']
数值枚举标识符
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "app.enums",
"name": "Status"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "0"
}
}
app::enums::Status::0
app.enums.Status['0']
basics/expressionsUnparsed未解析的
basics/expressionsNew构造器
{
"concept": "New"
}
[编译方法未实现]
__IDENTIFIER__
basics/expressionsNewComposite实体/(匿名)数据结构构造器
{
"concept": "NewComposite",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.dataSources.defaultDS.entities",
"typeName": "Student",
"inferred": false,
"ruleMap": {}
},
"properties": [
{
"concept": "Identifier",
"namespace": "",
"name": "id"
},
{
"concept": "Identifier",
"namespace": "",
"name": "createdTime"
},
{
"concept": "Identifier",
"namespace": "",
"name": "updatedTime"
},
{
"concept": "Identifier",
"namespace": "",
"name": "createdBy"
},
{
"concept": "Identifier",
"namespace": "",
"name": "updatedBy"
},
{
"concept": "Identifier",
"namespace": "",
"name": "name"
}
],
"rights": [
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"concept": "StringLiteral",
"value": "学生甲"
},
"members": []
}
],
"assignmentLines": [
{
"concept": "AssignmentLine",
"leftIndex": [
0,
5
],
"rightIndex": [
0
]
}
],
"hideProperties": false,
"hideDefaults": false,
"autoConnection": true
}
app::dataSources::defaultDS::entities::Student {
id=undefined,
createdTime=undefined,
updatedTime=undefined,
createdBy=undefined,
updatedBy=undefined,
name='学生甲',
}
nasl.util.NewEntity<Student>({ id:undefined, createdTime:undefined, updatedTime:undefined, createdBy:undefined, updatedBy:undefined, name:'学生甲' })
新建匿名数据结构
{
"concept": "NewComposite",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "anonymousStructure",
"typeNamespace": "",
"typeName": "",
"inferred": false,
"ruleMap": {},
"properties": [
{
"concept": "StructureProperty",
"name": "name"
},
{
"concept": "StructureProperty",
"name": "age"
}
]
},
"properties": [
{
"concept": "Identifier",
"namespace": "",
"name": "name"
},
{
"concept": "Identifier",
"namespace": "",
"name": "age"
}
],
"rights": [
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"concept": "NumericLiteral",
"value": "24",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"members": []
},
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"concept": "StringLiteral",
"value": "学生甲"
},
"members": []
}
],
"assignmentLines": [
{
"concept": "AssignmentLine",
"leftIndex": [
0,
0
],
"rightIndex": [
1
]
},
{
"concept": "AssignmentLine",
"leftIndex": [
0,
1
],
"rightIndex": [
0
]
}
],
"hideProperties": false,
"hideDefaults": false,
"autoConnection": true
}
{
name='学生甲',
age=24,
}
nasl.util.NewAnonymousStructure({ name:'学生甲', age:24 })
basics/expressionsNewList列表构造器
{
"concept": "NewList",
"items": [
{
"concept": "StringLiteral",
"value": "选项1"
},
{
"concept": "StringLiteral",
"value": "选项2"
},
{
"concept": "StringLiteral",
"value": "选项3"
}
]
}
['选项1', '选项2', '选项3']
nasl.util.NewList<__IDENTIFIER__>(['选项1', '选项2', '选项3'])
basics/expressionsNewMapMap 构造器
{
"concept": "NewMap",
"keys": [
{
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
{
"concept": "NumericLiteral",
"value": "2",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
{
"concept": "NumericLiteral",
"value": "3",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
],
"values": [
{
"concept": "StringLiteral",
"value": "选项1"
},
{
"concept": "StringLiteral",
"value": "选项2"
},
{
"concept": "StringLiteral",
"value": "选项3"
}
]
}
[1 -> '选项1', 2 -> '选项2', 3 -> '选项3']
nasl.util.NewMap<__IDENTIFIER__>({ 1: '选项1', 2: '选项2', 3: '选项3' })
basics/expressionsPaginate分页
basics/statementsAbort中止表达式
{
"concept": "Abort"
}
abort
throw new Error('程序中止');
basics/statementsStart开始节点
{
"concept": "Start"
}
basics/statementsEnd结束节点
{
"concept": "End"
}
end
return;
basics/statementsIfStatement条件分支
{
"concept": "IfStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"right": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"operator": "=="
},
"consequent": [
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "NullLiteral"
}
}
],
"alternate": [
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "BinaryExpression",
"left": {
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "ListSum",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
}
]
},
"right": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"operator": "/"
}
}
]
}
if (list.length == 0) {
result = null
} else {
result = nasl::util::ListSum(list) / list.length
}
if (list.length == 0) {
result = null
} else {
result = nasl.util.ListSum(list) / list.length
}
basics/statementsSwitchStatement选择分支
{
"concept": "SwitchStatement",
"cases": [
{
"concept": "SwitchCase",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"right": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"operator": "=="
},
"consequent": [
{
"concept": "CallLogic",
"uuid": "1a3ec5f53ff84d5f87cd9d81b741bd39",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "情况1"
}
}
]
}
]
},
{
"concept": "SwitchCase",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"right": {
"concept": "NumericLiteral",
"value": "10",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"operator": "<="
},
"consequent": [
{
"concept": "CallLogic",
"uuid": "08d83151df934c3e904ab8704e14b2ae",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "情况2"
}
}
]
}
]
},
{
"concept": "SwitchCase",
"consequent": [
{
"concept": "CallLogic",
"uuid": "11fe6dacbd3f42749c14c272fad6ffbb",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "其它情况"
}
}
]
}
]
}
]
}
switch {
list.length == 0 => {
nasl::logging::INFO('情况1')
}
list.length <= 10 => {
nasl::logging::INFO('情况2')
}
_ => {
nasl::logging::INFO('其它情况')
}
}
if (list.length == 0) {
nasl.logging.INFO('情况1')
}
else if (list.length <= 10) {
nasl.logging.INFO('情况2')
}
else {
nasl.logging.INFO('其它情况')
}
basics/statementsSwitchCase选择分支情况
{
"concept": "SwitchCase",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"right": {
"concept": "NumericLiteral",
"value": "10",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"operator": "<="
},
"consequent": [
{
"concept": "CallLogic",
"uuid": "08d83151df934c3e904ab8704e14b2ae",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "情况2"
}
}
]
}
]
}
list.length <= 10 => {
nasl::logging::INFO('情况2')
}
if (list.length <= 10) {
nasl.logging.INFO('情况2')
}
else
{
"concept": "SwitchCase",
"consequent": [
{
"concept": "CallLogic",
"uuid": "11fe6dacbd3f42749c14c272fad6ffbb",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "其它情况"
}
}
]
}
]
}
_ => {
nasl::logging::INFO('其它情况')
}
if (__IDENTIFIER__) {
nasl.logging.INFO('其它情况')
}
basics/statementsForEachStatementForEach 循环分支
{
"concept": "ForEachStatement",
"each": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"item": {
"concept": "Param",
"name": "item",
"description": ""
},
"index": {
"concept": "Param",
"name": "index",
"description": ""
},
"start": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"body": [
{
"concept": "IfStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "productReport"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "accepted"
}
},
"right": {
"concept": "BooleanLiteral",
"value": "true"
},
"operator": "=="
},
"consequent": [
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "Add",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "fullAcceptedList"
}
},
{
"concept": "Argument",
"keyword": "item",
"expression": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
]
}
],
"alternate": [
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "Add",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "fullAcceptedList"
}
},
{
"concept": "Argument",
"keyword": "item",
"expression": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
]
}
]
}
]
}
for (item in list, index) {
if (item.productReport.accepted == true) {
nasl::util::Add(fullAcceptedList, 1)
} else {
nasl::util::Add(fullAcceptedList, 0)
}
}
ForEach(list, 0, __IDENTIFIER__, (item, index) => {
if (item.productReport.accepted == true) {
nasl.util.Add(fullAcceptedList, 1)
} else {
nasl.util.Add(fullAcceptedList, 0)
}
})
{
"concept": "ForEachStatement",
"each": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"item": {
"concept": "Param",
"name": "item",
"description": ""
},
"index": {
"concept": "Param",
"name": "index",
"description": ""
},
"start": {
"concept": "NumericLiteral",
"value": "3",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"end": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"operator": "-",
"right": {
"concept": "NumericLiteral",
"value": "3",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
},
"body": [
{
"concept": "IfStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "productReport"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "accepted"
}
},
"right": {
"concept": "BooleanLiteral",
"value": "true"
},
"operator": "=="
},
"consequent": [
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "Add",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "fullAcceptedList"
}
},
{
"concept": "Argument",
"keyword": "item",
"expression": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
]
}
],
"alternate": [
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "Add",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "fullAcceptedList"
}
},
{
"concept": "Argument",
"keyword": "item",
"expression": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
]
}
]
}
]
}
for (item in list, index in 3 to list.length - 3) {
if (item.productReport.accepted == true) {
nasl::util::Add(fullAcceptedList, 1)
} else {
nasl::util::Add(fullAcceptedList, 0)
}
}
ForEach(list, 3, list.length - 3, (item, index) => {
if (item.productReport.accepted == true) {
nasl.util.Add(fullAcceptedList, 1)
} else {
nasl.util.Add(fullAcceptedList, 0)
}
})
basics/statementsWhileStatementWhile 循环分支
{
"concept": "WhileStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"operator": ">",
"right": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
},
"body": [
{
"concept": "CallFunction",
"calleeNamespace": "nasl.util",
"calleeName": "RemoveAt",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
},
{
"concept": "Argument",
"keyword": "index",
"expression": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
]
}
]
}
while (list.length > 0) {
nasl::util::RemoveAt(list, 0);
}
while (list.length > 0) {
nasl.util.RemoveAt(list, 0);
}
basics/statementsAssignment赋值语句
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "product"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "price"
}
}
}
result = product.price
result = product.price
basics/statementsBatchAssignment批量赋值语句
{
"concept": "BatchAssignment",
"label": "批量赋值",
"left": {
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"members": [
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "accepted"
}
},
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "executed"
}
},
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "fullAccepted"
}
},
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "success"
}
}
]
},
"rights": [
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"uuid": "52f1329c82414b9a8c320815cf703425",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "app.logics",
"calleeName": "computeRatio",
"handleError": false,
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "executedList"
}
}
]
},
"members": []
},
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"uuid": "aabee80d05b94a64ab797bae0f11aa85",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "app.logics",
"calleeName": "computeRatio",
"handleError": false,
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "successList"
}
}
]
},
"members": []
},
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"uuid": "a274f5173af049feaee53c1b968c17c1",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "app.logics",
"calleeName": "computeRatio",
"handleError": false,
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "acceptedList"
}
}
]
},
"members": []
},
{
"concept": "SelectMembers",
"hideMembers": false,
"expression": {
"uuid": "6ac10af536c446acbc7179b4f525d3d6",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "app.logics",
"calleeName": "computeRatio",
"handleError": false,
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "fullAcceptedList"
}
}
]
},
"members": []
}
],
"assignmentLines": [
{
"concept": "AssignmentLine",
"leftIndex": [
0,
2
],
"rightIndex": [
3
]
},
{
"concept": "AssignmentLine",
"leftIndex": [
0,
0
],
"rightIndex": [
2
]
},
{
"concept": "AssignmentLine",
"leftIndex": [
0,
3
],
"rightIndex": [
1
]
},
{
"concept": "AssignmentLine",
"leftIndex": [
0,
1
],
"rightIndex": [
0
]
}
],
"autoConnection": true
}
{
result.fullAccepted = app::logics::computeRatio(fullAcceptedList);
result.accepted = app::logics::computeRatio(acceptedList);
result.success = app::logics::computeRatio(successList);
result.executed = app::logics::computeRatio(executedList);
}
{
result.fullAccepted = app.logics.computeRatio(fullAcceptedList);
result.accepted = app.logics.computeRatio(acceptedList);
result.success = app.logics.computeRatio(successList);
result.executed = app.logics.computeRatio(executedList);
}
basics/statementsComment注释
{
"concept": "Comment",
"value": "这是一段注释,用户可自行修改。"
}
/* 这是一段注释,用户可自行修改。 */
/* 这是一段注释,用户可自行修改。 */
basics/statementsCallLogic调用逻辑
{
"uuid": "43a14fc183ed4b1bab03a839ea7fce9f",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.saveModal_1.logics",
"calleeName": "open",
"arguments": []
}
$refs::saveModal_1::open()
$refs.saveModal_1.open()
带 shortcut
{
"uuid": "d5ab84861fa64b5f928b655182c9a19d",
"concept": "CallLogic",
"label": "输出日志",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringInterpolation",
"expressions": [
{
"concept": "StringLiteral",
"value": "count: "
},
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "ListSum",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
}
]
},
{
"concept": "StringLiteral",
"value": ", length: "
},
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
}
]
}
}
]
}
nasl::logging::INFO(s"count: ${nasl::util::ListSum(list)}, length: ${list.length}")
nasl.logging.INFO(`count: ${nasl.util.ListSum(list)}, length: ${list.length}`)
basics/statementsCallEvent触发事件
basics/statementsCallInterface调用接口
basics/statementsCallMicroserviceInterface调用微服务接口
basics/statementsDestination跳转页面
{
"concept": "Destination",
"viewNamespace": "app.frontendTypes.pc.frontends.pc.views.dashboard.views",
"viewName": "productList",
"arguments": [],
"target": "_self",
"anchor": {
"concept": "Anchor",
"expression": {
"concept": "StringLiteral",
"value": "标题1"
}
}
}
goto app::frontendTypes::pc::frontends::pc::views::dashboard::views::productList()(
target = "_self",
anchor = '标题1',
)
nasl.ui.destination('undefined.dashboard_view.productList_view')
basics/statementsExternalDestination跳转到外部链接
{
"concept": "ExternalDestination",
"link": {
"concept": "StringLiteral",
"value": "https://nasl.codewave.163.com",
"folded": false
},
"target": "_self"
}
goto 'https://nasl.codewave.163.com'("_self")
nasl.ui.gotoLink('https://nasl.codewave.163.com', undefined)
basics/statementsArgument实际参数
{
"concept": "Argument",
"keyword": "",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list1"
}
}
list1
list1
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list1"
}
}
list1
list1
basics/statementsAnchor锚点参数
{
"concept": "Anchor",
"expression": {
"concept": "StringLiteral",
"value": "标题1"
}
}
'标题1'
'标题1'
basics/statementsJSBlockJS 代码块
basics/statementsBlockBlock 语句
{
"concept": "Block",
"logicItems": [
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "NullLiteral"
}
},
{
"concept": "CallLogic",
"uuid": "11fe6dacbd3f42749c14c272fad6ffbb",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringLiteral",
"value": "其它情况"
}
}
]
}
]
}
{
result = null;
nasl::logging::INFO('其它情况');
}
{
result = null;
nasl.logging.INFO('其它情况');
}
basics/statementsCallAuthInterface调用接口
basics[[BaseNode]]节点基类
basicsAnnotation注解
basicsAnnotationProperty注解属性
basics[[Annotatable]]可使用注解
basicsApplyAnnotation使用注解
basicsLogicDeclaration逻辑声明
basicsLogic逻辑
{
"concept": "Logic",
"name": "logic1",
"title": "标题",
"description": "",
"triggerType": "",
"cron": "",
"overridable": false,
"transactional": {
"concept": "Transactional",
"enabled": false,
"propagation": "REQUIRED",
"isolation": "DEFAULT"
},
"params": [
{
"concept": "Param",
"name": "list",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeNamespace": "nasl.collection",
"typeKind": "generic",
"typeName": "List",
"typeArguments": [
{
"concept": "TypeAnnotation",
"typeNamespace": "nasl.core",
"typeKind": "primitive",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
],
"inferred": false,
"ruleMap": {}
}
}
],
"returns": [
{
"concept": "Return",
"name": "result",
"description": ""
}
],
"variables": [],
"body": [
{
"concept": "Start"
},
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "NullLiteral"
}
},
{
"concept": "IfStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"right": {
"concept": "NumericLiteral",
"value": "0",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"operator": "=="
},
"consequent": [
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "NullLiteral"
}
}
],
"alternate": [
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "BinaryExpression",
"left": {
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "ListSum",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
}
]
},
"right": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
},
"operator": "/"
}
}
]
},
{
"concept": "End"
}
],
"playground": []
}
@(
title = "标题",
description = "",
triggerType = "",
cron = "",
transactional = [编译方法未实现],
overridable = false,
)
logic logic1(list: List<Integer>) => result {
result = null
if (list.length == 0) {
result = null
} else {
result = nasl::util::ListSum(list) / list.length
}
end
}
function logic1(list: List<Long>) {
let result;
result = null
if (list.length == 0) {
result = null
} else {
result = nasl.util.ListSum(list) / list.length
}
return result;
}
basicsAuthLogic鉴权逻辑
basicsAuthLogicForCallInterface调用接口的鉴权逻辑
basicsOverriddenLogic覆写逻辑
{
"concept": "OverriddenLogic",
"overriddenModule": "lcap_permission",
"name": "checkPermission",
"description": "校验用户访问资源的权限",
"triggerType": "",
"cron": "",
"transactional": {
"concept": "Transactional",
"enabled": false
},
"params": [
{
"concept": "Param",
"name": "userId",
"description": "用户唯一标识",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
},
{
"concept": "Param",
"name": "resourceValue",
"description": "资源值(通常为浏览器上的访问路径)",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
},
{
"concept": "Param",
"name": "resourceType",
"description": "资源的类型(表示当前资源是页面还是组件)",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
},
{
"concept": "Param",
"name": "clientType",
"description": "资源所属的端标识(多端场景下存在重名资源)",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
}
],
"returns": [
{
"concept": "Return",
"name": "result",
"description": "用户是否能访问指定资源",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Boolean",
"inferred": false,
"ruleMap": {}
},
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "BooleanLiteral",
"value": "false"
},
"playground": []
}
}
],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"concept": "IfStatement",
"test": {
"concept": "BinaryExpression",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "resourceValue"
},
"right": {
"concept": "StringLiteral",
"value": "/index"
},
"operator": "=="
},
"consequent": [
{
"concept": "Assignment",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "result"
},
"right": {
"concept": "BooleanLiteral",
"value": "true"
}
}
],
"alternate": [],
"label": "条件分支"
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}
@override(lcap_permission)
logic checkPermission(userId: String, resourceValue: String, resourceType: String, clientType: String) => result: Boolean {
if (resourceValue == '/index') {
result = true
} else {
}
end
}
function checkPermission(userId: String, resourceValue: String, resourceType: String, clientType: String): Boolean {
let result: Boolean;
if (resourceValue == '/index') {
result = true
} else {
}
return;
}
basicsBusinessLogic业务组件逻辑
basics[[AbstractInterface]]接口
basicsParam输入参数
{
"concept": "Param",
"name": "filter",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Date",
"inferred": false,
"ruleMap": {}
}
}
filter: Date
filter: Date
无类型标注的参数
{
"concept": "Param",
"name": "index",
"description": ""
}
index: String
index: String
basicsParamWithGroup带分组的参数
{
"concept": "ParamWithGroup",
"name": "size",
"title": "大小",
"group": "分组1",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
@(
title = "大小",
group = "分组1",
)
size: Integer
size: Long
basicsReturn输出参数
{
"concept": "Return",
"name": "result",
"description": ""
}
result
result
basicsVariable变量
{
"concept": "Variable",
"name": "total",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
total: Integer
total: Long
basicsBackendVariable后端全局变量
{
"concept": "BackendVariable",
"name": "httpRequest",
"description": "httpRequest对象,可在逻辑中使用,用于获取当前请求的属性,例如: cookie、header、ip等",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "generic",
"typeNamespace": "nasl.http",
"typeName": "HttpRequest",
"typeArguments": [
{
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
],
"inferred": false,
"ruleMap": {}
},
"scope": "request"
}
[编译方法未实现]
httpRequest: HttpRequest<String>
basicsFrontendVariable前端全局变量
{
"concept": "FrontendVariable",
"localCache": false,
"name": "frontendVariable1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
}
}
frontendVariable1: String
frontendVariable1: String
basicsConstant常量
{
"concept": "Constant",
"name": "MAX_COUNT",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "NumericLiteral",
"value": "100",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"playground": []
}
}
[编译方法未实现]
[编译方法未实现]
basics[[LogicItem]]逻辑项
basicsSubLogic子逻辑
basicsFunction函数
basicsAnonymousFunction匿名函数
{
"concept": "AnonymousFunction",
"params": [
{
"concept": "Param",
"name": "item",
"description": ""
}
],
"body": {
"concept": "BinaryExpression",
"left": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "productReport"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "executed"
}
},
"right": {
"concept": "NullLiteral"
},
"operator": "!="
}
}
{ item: String => item.productReport.executed != null }
(item: String) => item.productReport.executed != null
basics[[ImportedInterface]]由JSON生成接口
basicsInterface接口
basicsConnectionInfo微服务连接配置信息
basicsMicroserviceInterface微服务接口
basicsInterfaceParam接口参数
basicsTransactional事务
{
"concept": "Transactional",
"enabled": true
}
[编译方法未实现]
basicsDefaultValue默认值
{
"concept": "DefaultValue",
"expression": {
"concept": "NumericLiteral",
"value": "120",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"playground": []
}
120
120
basicsJavaLogicJava 扩展逻辑
basicsAuthInterface鉴权接口
basicsDependency依赖项配置信息
modularityApp应用
modularityModule模块
modularityNamespace命名空间
modularityFrontendType端类型
modularityFrontend前端
modularityBackend后端
modularityFrontendLibrary前端库
integrationIntegration集成
integrationMicroApp微应用
integration[[TriggerEvent]]触发器事件
integrationMsgTriggerEvent触发器事件消息
integrationInterfaceTriggerEvent触发器api回调事件
integrationConnectorTrigger连接器触发器
integrationTriggerLauncher触发器启动器
integrationConnectorTriggerLauncher连接器触发器启动器
integrationMsgTriggerLauncher触发器启动器消息
integrationConnector连接器
integrationCallConnector调用连接器
integrationConnection连接
integrationConnectorLogic连接器操作逻辑
dataDataSource数据源
{
"concept": "DataSource",
"name": "defaultDS",
"description": "默认数据源",
"entities": [
{
"concept": "Entity",
"name": "Product",
"description": "",
"uuid": "bd624ce40865488faff6d6e6a5f04422",
"tableName": "product",
"origin": "ide",
"properties": [
{
"concept": "EntityProperty",
"name": "id",
"uuid": "4a1d95bf7a3c4c14a6b0e19da915908c",
"columnName": "id",
"label": "主键",
"description": "主键",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"required": true,
"primaryKey": true,
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto",
"sequence": "Entity11050486256"
},
{
"concept": "EntityProperty",
"name": "createdTime",
"uuid": "a64b6d6b317a4e6f84532986d7c35aa3",
"columnName": "created_time",
"label": "创建时间",
"description": "创建时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "updatedTime",
"uuid": "24167f6184964537857b4031479f0262",
"columnName": "updated_time",
"label": "更新时间",
"description": "更新时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "createdBy",
"uuid": "971e11c2bf224828a7f328417049f94b",
"columnName": "created_by",
"label": "创建者",
"description": "创建者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "updatedBy",
"uuid": "8c409bb2165946358064f43b334fb5a6",
"columnName": "updated_by",
"label": "更新者",
"description": "更新者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "price",
"uuid": "8f9b69575e4c4e33b8673aefe7ada2c0",
"label": "",
"description": "",
"columnName": "price",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Decimal",
"inferred": false,
"ruleMap": {
"scale": 2
}
},
"databaseTypeAnnotation": {
"concept": "DatabaseTypeAnnotation",
"typeName": "decimal",
"arguments": {
"precision": "31"
}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "name",
"uuid": "f617749bae2545639102821de778add3",
"label": "",
"description": "",
"columnName": "name",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "category",
"uuid": "78500e51966245d984b095c7795dd21e",
"label": "",
"description": "",
"columnName": "category",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "status",
"uuid": "b1a9e167277e4f73b6b218eb7ede43ad",
"label": "",
"description": "",
"columnName": "status",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.enums",
"typeName": "ProductStatus",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
}
],
"indexes": []
}
],
"ddlStrategy": "originNotTable"
}
dataSource defaultDS {
@(
description = "",
uuid = "bd624ce40865488faff6d6e6a5f04422",
tableName = "product",
origin = "ide",
)
entity Product {
@(
label = "主键",
description = "主键",
uuid = "4a1d95bf7a3c4c14a6b0e19da915908c",
columnName = "id",
required = true,
primaryKey = true,
generationRule = "auto",
sequence = "Entity11050486256",
)
id: Integer;

@(
label = "创建时间",
description = "创建时间",
uuid = "a64b6d6b317a4e6f84532986d7c35aa3",
columnName = "created_time",
generationRule = "auto",
)
createdTime: DateTime;

@(
label = "更新时间",
description = "更新时间",
uuid = "24167f6184964537857b4031479f0262",
columnName = "updated_time",
generationRule = "auto",
)
updatedTime: DateTime;

@(
label = "创建者",
description = "创建者",
uuid = "971e11c2bf224828a7f328417049f94b",
columnName = "created_by",
generationRule = "auto",
)
createdBy: String;

@(
label = "更新者",
description = "更新者",
uuid = "8c409bb2165946358064f43b334fb5a6",
columnName = "updated_by",
generationRule = "auto",
)
updatedBy: String;

@(
label = "",
description = "",
uuid = "8f9b69575e4c4e33b8673aefe7ada2c0",
columnName = "price",
databaseTypeAnnotation = @DatabaseTypeAnnotation(
typeName = "decimal",
arguments = [ "precision" -> "31" ],
)
,
generationRule = "manual",
)
price: Decimal;

@(
label = "",
description = "",
uuid = "f617749bae2545639102821de778add3",
columnName = "name",
generationRule = "manual",
)
name: String;

@(
label = "",
description = "",
uuid = "78500e51966245d984b095c7795dd21e",
columnName = "category",
generationRule = "manual",
)
category: String;

@(
label = "",
description = "",
uuid = "b1a9e167277e4f73b6b218eb7ede43ad",
columnName = "status",
generationRule = "manual",
)
status: app::enums::ProductStatus;
}
}
namespace app.dataSources.defaultDS {
class Product {
id: Long;
createdTime: DateTime;
updatedTime: DateTime;
createdBy: String;
updatedBy: String;
price: Decimal;
name: String;
category: String;
status: ProductStatus;
}
const ProductEntity = createEntity<Product>();
}
dataEntity实体
{
"concept": "Entity",
"name": "Product",
"description": "",
"uuid": "bd624ce40865488faff6d6e6a5f04422",
"tableName": "product",
"origin": "ide",
"properties": [
{
"concept": "EntityProperty",
"name": "id",
"uuid": "4a1d95bf7a3c4c14a6b0e19da915908c",
"columnName": "id",
"label": "主键",
"description": "主键",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"required": true,
"primaryKey": true,
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto",
"sequence": "Entity11050486256"
},
{
"concept": "EntityProperty",
"name": "createdTime",
"uuid": "a64b6d6b317a4e6f84532986d7c35aa3",
"columnName": "created_time",
"label": "创建时间",
"description": "创建时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "updatedTime",
"uuid": "24167f6184964537857b4031479f0262",
"columnName": "updated_time",
"label": "更新时间",
"description": "更新时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "createdBy",
"uuid": "971e11c2bf224828a7f328417049f94b",
"columnName": "created_by",
"label": "创建者",
"description": "创建者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "updatedBy",
"uuid": "8c409bb2165946358064f43b334fb5a6",
"columnName": "updated_by",
"label": "更新者",
"description": "更新者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "auto"
},
{
"concept": "EntityProperty",
"name": "price",
"uuid": "8f9b69575e4c4e33b8673aefe7ada2c0",
"label": "",
"description": "",
"columnName": "price",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Decimal",
"inferred": false,
"ruleMap": {
"scale": 2
}
},
"databaseTypeAnnotation": {
"concept": "DatabaseTypeAnnotation",
"typeName": "decimal",
"arguments": {
"precision": "31"
}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "name",
"uuid": "f617749bae2545639102821de778add3",
"label": "",
"description": "",
"columnName": "name",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "category",
"uuid": "78500e51966245d984b095c7795dd21e",
"label": "",
"description": "",
"columnName": "category",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
},
{
"concept": "EntityProperty",
"name": "status",
"uuid": "b1a9e167277e4f73b6b218eb7ede43ad",
"label": "",
"description": "",
"columnName": "status",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.enums",
"typeName": "ProductStatus",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
}
],
"indexes": []
}
@(
description = "",
uuid = "bd624ce40865488faff6d6e6a5f04422",
tableName = "product",
origin = "ide",
)
entity Product {
@(
label = "主键",
description = "主键",
uuid = "4a1d95bf7a3c4c14a6b0e19da915908c",
columnName = "id",
required = true,
primaryKey = true,
generationRule = "auto",
sequence = "Entity11050486256",
)
id: Integer;

@(
label = "创建时间",
description = "创建时间",
uuid = "a64b6d6b317a4e6f84532986d7c35aa3",
columnName = "created_time",
generationRule = "auto",
)
createdTime: DateTime;

@(
label = "更新时间",
description = "更新时间",
uuid = "24167f6184964537857b4031479f0262",
columnName = "updated_time",
generationRule = "auto",
)
updatedTime: DateTime;

@(
label = "创建者",
description = "创建者",
uuid = "971e11c2bf224828a7f328417049f94b",
columnName = "created_by",
generationRule = "auto",
)
createdBy: String;

@(
label = "更新者",
description = "更新者",
uuid = "8c409bb2165946358064f43b334fb5a6",
columnName = "updated_by",
generationRule = "auto",
)
updatedBy: String;

@(
label = "",
description = "",
uuid = "8f9b69575e4c4e33b8673aefe7ada2c0",
columnName = "price",
databaseTypeAnnotation = @DatabaseTypeAnnotation(
typeName = "decimal",
arguments = [ "precision" -> "31" ],
)
,
generationRule = "manual",
)
price: Decimal;

@(
label = "",
description = "",
uuid = "f617749bae2545639102821de778add3",
columnName = "name",
generationRule = "manual",
)
name: String;

@(
label = "",
description = "",
uuid = "78500e51966245d984b095c7795dd21e",
columnName = "category",
generationRule = "manual",
)
category: String;

@(
label = "",
description = "",
uuid = "b1a9e167277e4f73b6b218eb7ede43ad",
columnName = "status",
generationRule = "manual",
)
status: app::enums::ProductStatus;
}
class Product {
id: Long;
createdTime: DateTime;
updatedTime: DateTime;
createdBy: String;
updatedBy: String;
price: Decimal;
name: String;
category: String;
status: ProductStatus;
}
const ProductEntity = createEntity<Product>();
dataEntityProperty实体属性
{
"concept": "EntityProperty",
"name": "status",
"uuid": "b1a9e167277e4f73b6b218eb7ede43ad",
"label": "",
"description": "",
"columnName": "status",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "reference",
"typeNamespace": "app.enums",
"typeName": "ProductStatus",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
}
@(
label = "",
description = "",
uuid = "b1a9e167277e4f73b6b218eb7ede43ad",
columnName = "status",
generationRule = "manual",
)
status: app::enums::ProductStatus
status: ProductStatus
带关联关系的
{
"concept": "EntityProperty",
"name": "productId",
"uuid": "b1a9e167277e4f73b6b218eb7ede43ad",
"label": "",
"description": "",
"columnName": "productId",
"relationNamespace": "app.dataSources.defaultDS",
"relationEntity": "Product",
"relationProperty": "id",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
}
@(
label = "",
description = "",
uuid = "b1a9e167277e4f73b6b218eb7ede43ad",
columnName = "productId",
generationRule = "manual",
)
productId: Integer
@EntityRelation(() => new Product().id)
productId: Long
带数据源类型的
{
"concept": "EntityProperty",
"name": "price",
"uuid": "8f9b69575e4c4e33b8673aefe7ada2c0",
"label": "",
"description": "",
"columnName": "price",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Decimal",
"inferred": false,
"ruleMap": {
"scale": 2
}
},
"databaseTypeAnnotation": {
"concept": "DatabaseTypeAnnotation",
"typeName": "decimal",
"arguments": {
"precision": "31"
}
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "manual"
}
@(
label = "",
description = "",
uuid = "8f9b69575e4c4e33b8673aefe7ada2c0",
columnName = "price",
databaseTypeAnnotation = @DatabaseTypeAnnotation(
typeName = "decimal",
arguments = [ "precision" -> "31" ],
)
,
generationRule = "manual",
)
price: Decimal
price: Decimal
dataEntityIndex实体索引
{
"concept": "EntityIndex",
"name": "nameIndex",
"propertyNames": [
"name"
],
"unique": true
}
[编译方法未实现]
viewView页面
viewViewElement页面元素
{
"concept": "ViewElement",
"tag": "u-button",
"name": "button_2",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "color",
"type": "string",
"value": "primary",
"playground": []
},
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "创 建",
"playground": []
}
],
"bindEvents": [
{
"concept": "BindEvent",
"name": "click",
"logics": [
{
"concept": "Logic",
"name": "click",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"uuid": "0550e0f6863a4d849ee643d16336e420",
"concept": "CallLogic",
"label": "弹出消息",
"calleeNamespace": "nasl.ui",
"calleeName": "showMessage",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "text",
"expression": {
"concept": "StringLiteral",
"value": "点击了“创 建”按钮"
}
}
]
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
},
{
"concept": "Logic",
"name": "create",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "input"
},
"right": {
"concept": "CallFunction",
"label": "调用逻辑",
"calleeNamespace": "nasl.util",
"calleeName": "Clone",
"arguments": [
{
"concept": "Argument",
"keyword": "obj",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
}
]
}
},
{
"uuid": "43a14fc183ed4b1bab03a839ea7fce9f",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.saveModal_1.logics",
"calleeName": "open",
"arguments": []
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}
]
}
],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
@(name = "button_2")
UButton {
color = 'primary',
text = '创 建',
onClick: [
logic click(event) {
nasl::ui::showMessage('点击了“创 建”按钮')
end
},
logic create(event) {
input = nasl::util::Clone(student)
$refs::saveModal_1::open()
end
},
],
}
$refs.button_2 = new UButton({
color: 'primary',
text: '创 建',
onClick: [
function click() {
nasl.ui.showMessage('点击了“创 建”按钮')
return;
},
function create() {
input = nasl.util.Clone(student)
$refs.saveModal_1.open()
return;
},
],
})
{
"concept": "ViewElement",
"tag": "u-modal",
"name": "modal_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "visible",
"type": "dynamic",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "modalVisible"
},
"rules": [],
"sync": true,
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "template",
"name": "template_1",
"slotTarget": "foot",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "u-linear-layout",
"name": "linear_layout_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "justify",
"type": "string",
"value": "center",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "u-button",
"name": "button_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "color",
"type": "string",
"value": "primary",
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "确 定",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
},
{
"concept": "ViewElement",
"tag": "u-button",
"name": "button_2",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "取 消",
"rules": [],
"playground": []
}
],
"bindEvents": [
{
"concept": "BindEvent",
"name": "click",
"logics": [
{
"concept": "Logic",
"name": "click",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"uuid": "bc414eb6611e417c92a25ca5c125a2ed",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.modal_1.logics",
"calleeName": "close",
"arguments": []
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}
]
}
],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
}
]
},
{
"concept": "ViewElement",
"tag": "template",
"name": "template_2",
"slotTarget": "body",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "u-text",
"name": "text_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "内容",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
},
{
"concept": "ViewElement",
"tag": "template",
"name": "template_3",
"slotTarget": "title",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "u-text",
"name": "text_2",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "标题",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
}
]
}
@(name = "modal_1")
UModal {
visible = modalVisible,
slotFoot = { () => [
@(name = "linear_layout_1")
ULinearLayout {
justify = 'center',
slotDefault = { () => [
@(name = "button_1")
UButton {
color = 'primary',
text = '确 定',
},
@(name = "button_2")
UButton {
text = '取 消',
onClick: [
logic click(event) {
$refs::modal_1::close()
end
},
],
},
] },
},
] },
slotBody = { () => [
@(name = "text_1")
UText {
text = '内容',
},
] },
slotTitle = { () => [
@(name = "text_2")
UText {
text = '标题',
},
] },
}
$refs.modal_1 = new UModal({
visible: sync(modalVisible),
slotFoot: () => [
$refs.linear_layout_1 = new ULinearLayout({
justify: 'center',
slotDefault: () => [
$refs.button_1 = new UButton({
color: 'primary',
text: '确 定',
}),
$refs.button_2 = new UButton({
text: '取 消',
onClick: [
function click() {
$refs.modal_1.close()
return;
},
],
}),
],
}),
],
slotBody: () => [
$refs.text_1 = new UText({
text: '内容',
}),
],
slotTitle: () => [
$refs.text_2 = new UText({
text: '标题',
}),
],
})
{
"concept": "ViewElement",
"tag": "van-list-view",
"name": "listView_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "dataSource",
"type": "dynamic",
"value": "",
"expression": {
"concept": "CallLogic",
"uuid": "12b52ad1a67840e2ba9abf951449ecde",
"calleeNamespace": "app.logics",
"calleeName": "loadAaaListView_1",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "page",
"expression": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "elements"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "$ce"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "page"
}
}
},
{
"concept": "Argument",
"keyword": "size",
"expression": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "elements"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "$ce"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "size"
}
}
}
]
},
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "pageSize",
"type": "static",
"value": "50",
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "pageNumber",
"type": "static",
"value": "1",
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "pageable",
"type": "string",
"value": "auto-more",
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "remotePaging",
"type": "static",
"value": "true",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "template",
"name": "template_19",
"slotTarget": "next",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "van-text",
"name": "text_11",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "下一页",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
},
{
"concept": "ViewElement",
"tag": "template",
"name": "template_20",
"slotTarget": "prev",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "van-text",
"name": "text_12",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "string",
"value": "上一页",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
},
{
"concept": "ViewElement",
"tag": "template",
"name": "template_21",
"slotTarget": "item",
"slotScope": "current",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "van-cell",
"name": "cell_1",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "value",
"type": "dynamic",
"value": "",
"expression": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "current"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "item"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
},
"rules": [],
"playground": []
},
{
"concept": "BindAttribute",
"name": "isLink",
"type": "string",
"value": "",
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "template",
"name": "template_22",
"slotTarget": "title",
"slotScope": "",
"bindAttrs": [],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": [
{
"concept": "ViewElement",
"tag": "van-text",
"name": "text_13",
"bindAttrs": [
{
"concept": "BindAttribute",
"name": "text",
"type": "dynamic",
"value": "",
"expression": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "current"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "item"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
},
"rules": [],
"playground": []
}
],
"bindEvents": [],
"bindDirectives": [],
"bindRoles": [],
"bindStyles": [],
"children": []
}
]
}
]
}
]
}
]
}
@(name = "listView_1")
VanListView {
dataSource = app::logics::loadAaaListView_1($currentElement.page, $currentElement.size),
pageSize = 50,
pageNumber = 1,
pageable = 'auto-more',
remotePaging = true,
slotNext = { () => [
@(name = "text_11")
VanText {
text = '下一页',
},
] },
slotPrev = { () => [
@(name = "text_12")
VanText {
text = '上一页',
},
] },
slotItem = { (current) => [
@(name = "cell_1")
VanCell {
value = current.item.student.name,
isLink = '',
slotTitle = { () => [
@(name = "text_13")
VanText {
text = current.item.student.name,
},
] },
},
] },
}
$refs.listView_1 = new VanListView({
dataSource: app.logics.loadAaaListView_1(elements.$ce.page, elements.$ce.size),
pageSize: 50,
pageNumber: 1,
pageable: 'auto-more',
remotePaging: true,
slotNext: () => [
$refs.text_11 = new VanText({
text: '下一页',
}),
],
slotPrev: () => [
$refs.text_12 = new VanText({
text: '上一页',
}),
],
slotItem: (current) => [
$refs.cell_1 = new VanCell({
value: current.item.student.name,
isLink: '',
slotTitle: () => [
$refs.text_13 = new VanText({
text: current.item.student.name,
}),
],
}),
],
})
viewBindAttribute元素绑定属性字符串属性
{
"concept": "BindAttribute",
"name": "color",
"type": "string",
"value": "primary",
"playground": []
}
color = 'primary'
color: 'primary'
非字符串的静态类型属性
{
"concept": "BindAttribute",
"name": "min",
"type": "static",
"value": "24",
"playground": []
}
min = 24
min: 24
双向绑定属性
{
"concept": "BindAttribute",
"name": "visible",
"type": "dynamic",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "modalVisible"
},
"rules": [],
"sync": true,
"playground": []
}
visible = modalVisible
visible: sync(modalVisible)
viewBindDirective元素指令
{
"concept": "BindDirective",
"name": "if",
"type": "dynamic",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "visible"
},
"playground": []
}
if: visible
_if: visible
viewBindEvent元素绑定事件
{
"concept": "BindEvent",
"name": "click",
"logics": [
{
"concept": "Logic",
"name": "click",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"uuid": "bc414eb6611e417c92a25ca5c125a2ed",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.modal_1.logics",
"calleeName": "close",
"arguments": []
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}
],
"arguments": []
}
onClick: [
logic click(event) {
$refs::modal_1::close()
end
},
]
onClick: [
function click() {
$refs.modal_1.close()
return;
},
]
绑定多个事件逻辑
{
"concept": "BindEvent",
"name": "click",
"logics": [
{
"concept": "Logic",
"name": "click",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"uuid": "0550e0f6863a4d849ee643d16336e420",
"concept": "CallLogic",
"label": "弹出消息",
"calleeNamespace": "nasl.ui",
"calleeName": "showMessage",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "text",
"expression": {
"concept": "StringLiteral",
"value": "点击了“创 建”按钮"
}
}
]
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
},
{
"concept": "Logic",
"name": "create",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"concept": "Assignment",
"label": "赋值",
"left": {
"concept": "Identifier",
"namespace": "",
"name": "input"
},
"right": {
"concept": "CallFunction",
"label": "调用逻辑",
"calleeNamespace": "nasl.util",
"calleeName": "Clone",
"arguments": [
{
"concept": "Argument",
"keyword": "obj",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
}
]
}
},
{
"uuid": "43a14fc183ed4b1bab03a839ea7fce9f",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.saveModal_1.logics",
"calleeName": "open",
"arguments": []
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}
]
}
onClick: [
logic click(event) {
nasl::ui::showMessage('点击了“创 建”按钮')
end
},
logic create(event) {
input = nasl::util::Clone(student)
$refs::saveModal_1::open()
end
},
]
onClick: [
function click() {
nasl.ui.showMessage('点击了“创 建”按钮')
return;
},
function create() {
input = nasl.util.Clone(student)
$refs.saveModal_1.open()
return;
},
]
viewBindStyle元素绑定样式
{
"concept": "BindStyle",
"name": "background-color",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "bgColor"
},
"playground": []
}
`background-color`: bgColor
_background-color: bgColor
viewThemeVariable主题变量
view[[BaseSetter]]设置器基类
viewInputSetter输入框设置器
viewSwitchSetter切换设置器
viewSetterOption设置器枚举选项
viewEnumSelectSetter枚举选择设置器
viewCapsulesSetter胶囊设置器
viewNumberInputSetter数字输入设置器
viewIconSetter图标设置器
viewImageSetter图片设置器
viewPropertySelectSetter属性选择设置器
viewAnonymousFunctionSetter匿名函数设置器
viewViewComponentDeclaration页面组件
viewBusinessComponent业务组件
viewAttribute组件属性
viewEvent组件事件
viewPropDeclaration组件属性
viewEventDeclaration组件事件
viewSlotDeclaration插槽
viewTheme主题
viewSlot插槽
viewViewComponent页面组件
viewViewBlock页面组件的代码块
viewViewBlockWithImage带截图的代码块
processProcess流程
processProcessElement流程元素
processProcessComponent流程组件
process[[MultiApprovalPolicy]]审批策略
processSequentialPolicy依次审批
processCountersignPolicy会签
processProcessOutcome判断结果
processAssignee经办人
processProcessOutcomes判断结果数组
dataQueryCallQueryComponent数据查询
{
"concept": "CallQueryComponent",
"select": {
"concept": "QuerySelectExpression",
"distinct": false,
"star": true,
"selectElements": [
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderProduct",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderForm",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "Product",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryAggregateExpression",
"asName": "totalAmount",
"aggregateName": "SUM",
"aggregateParam": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
}
}
]
},
"from": {
"concept": "QueryFromExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "OrderProduct",
"joinParts": [
{
"concept": "QueryJoinExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "OrderForm",
"joinType": "INNER",
"onExpressions": [
{
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "orderId",
"asName": ""
},
"right": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderForm",
"propertyName": "id",
"asName": ""
},
"operator": "=="
}
],
"joinParts": [],
"asName": ""
},
{
"concept": "QueryJoinExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "Product",
"joinType": "INNER",
"onExpressions": [
{
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "productId",
"asName": ""
},
"right": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "Product",
"propertyName": "id",
"asName": ""
},
"operator": "=="
}
],
"joinParts": [],
"asName": ""
}
],
"asName": ""
},
"where": {
"concept": "BinaryExpression",
"left": {
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "createdBy",
"asName": "createdBy"
},
"right": {
"concept": "StringLiteral",
"value": "张三"
},
"operator": "=="
},
"right": {
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "createdTime",
"asName": ""
},
"right": {
"concept": "Identifier",
"namespace": "",
"name": "startDateTime"
},
"operator": ">"
},
"operator": "&&"
},
"wherePlayground": [],
"groupBy": [
{
"concept": "QueryGroupByExpression",
"groupElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"asName": "productId",
"entityAsName": "OrderProduct",
"propertyName": "productId"
}
},
{
"concept": "QueryGroupByExpression",
"groupElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"asName": "productName",
"entityAsName": "Product",
"propertyName": "name"
}
}
],
"havingPlayground": [],
"orderBy": [
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "Identifier",
"namespace": "inner",
"name": "productName"
},
"order": {
"concept": "StringLiteral",
"value": "ASC"
}
}
],
"limit": {
"concept": "QueryLimitExpression",
"pageElement": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"pageSizeElement": {
"concept": "NumericLiteral",
"value": "1000",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
},
"ideVersion": "2.22"
}
for OrderProduct in OrderProductEntity
inner join OrderForm in OrderForm
on OrderProduct.orderId == OrderForm.id
inner join Product in Product
on OrderProduct.productId == Product.id
where OrderProduct.createdBy == '张三' && OrderProduct.createdTime > startDateTime
groupby OrderProduct.productId, Product.name
orderby productName asc
select {
orderProduct: OrderProduct,
orderForm: OrderForm,
product: Product,
totalAmount: SUM(OrderProduct.amount),
productId: OrderProduct.productId,
productName: Product.name,
}
page 1 size 1000
FROM(app.dataSources.defaultDS.entities.OrderProductEntity, OrderProduct => $
.INNER_JOIN(app.dataSources.defaultDS.entities.OrderFormEntity, OrderForm => ON(() => OrderProduct.orderId == OrderForm.id)
.INNER_JOIN(app.dataSources.defaultDS.entities.ProductEntity, Product => ON(() => OrderProduct.productId == Product.id)
.WHERE(() => OrderProduct.createdBy == '张三' && OrderProduct.createdTime > startDateTime)
.GROUP_BY(() => OrderProduct.productId, Product.name)
.ORDER_BY(() => [productName, 'ASC'])
.SELECT(() => ({
orderProduct: OrderProduct,
orderForm: OrderForm,
product: Product,
totalAmount: SUM(OrderProduct.amount),
productId: OrderProduct.productId,
productName: Product.name,
}))
.PAGINATE(() => [1, 1000]))))
dataQueryQuerySelectExpression查询选择子句
{
"concept": "QuerySelectExpression",
"distinct": false,
"star": true,
"selectElements": [
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "Product",
"propertyName": "",
"asName": ""
}
]
}
select {
product: Product,
}
.SELECT(() => ({
product: Product,
}))
{
"concept": "QuerySelectExpression",
"distinct": false,
"star": true,
"selectElements": [
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderProduct",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderForm",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "Product",
"propertyName": "",
"asName": ""
},
{
"concept": "QueryAggregateExpression",
"asName": "totalAmount",
"aggregateName": "SUM",
"aggregateParam": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
}
}
]
}
select {
orderProduct: OrderProduct,
orderForm: OrderForm,
product: Product,
totalAmount: SUM(OrderProduct.amount),
}
.SELECT(() => ({
orderProduct: OrderProduct,
orderForm: OrderForm,
product: Product,
totalAmount: SUM(OrderProduct.amount),
}))
dataQueryQueryFromExpression查询 From 子句
{
"concept": "QueryFromExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "OrderProduct",
"asName": "",
"joinParts": []
}
for OrderProduct in OrderProductEntity
FROM(app.dataSources.defaultDS.entities.OrderProductEntity, OrderProduct => $
dataQueryQueryJoinExpression查询 Join 子句
{
"concept": "QueryJoinExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "OrderForm",
"joinType": "INNER",
"onExpressions": [
{
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "orderId",
"asName": ""
},
"right": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderForm",
"propertyName": "id",
"asName": ""
},
"operator": "=="
}
],
"joinParts": [],
"asName": ""
}
inner join OrderForm in OrderForm
on OrderProduct.orderId == OrderForm.id
.INNER_JOIN(app.dataSources.defaultDS.entities.OrderFormEntity, OrderForm => ON(() => OrderProduct.orderId == OrderForm.id)
dataQueryQueryFieldExpression查询属性
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderProduct",
"propertyName": "",
"asName": ""
}
OrderProduct
OrderProduct
{
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
}
OrderProduct.amount
OrderProduct.amount
dataQueryQueryAggregateExpression查询聚合函数
{
"concept": "QueryAggregateExpression",
"aggregateName": "SUM",
"aggregateParam": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
},
"asName": "totalAmount"
}
totalAmount: SUM(OrderProduct.amount)
totalAmount: SUM(OrderProduct.amount)
dataQueryQueryOrderByExpression查询排序子句
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "Identifier",
"namespace": "",
"name": "sort"
},
"order": {
"concept": "Identifier",
"namespace": "",
"name": "order"
}
}
sort ${order}
[sort, order]
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "Product",
"propertyName": "createdTime",
"asName": ""
},
"order": {
"concept": "StringLiteral",
"value": "DESC"
}
}
Product.createdTime desc
[Product.createdTime, 'DESC']
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "Identifier",
"namespace": "inner",
"name": "productName"
},
"order": {
"concept": "StringLiteral",
"value": "ASC"
}
}
productName asc
[productName, 'ASC']
dataQueryQueryGroupByExpression查询分组
{
"concept": "QueryGroupByExpression",
"groupElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "productId",
"asName": "productId"
}
}
OrderProduct.productId
OrderProduct.productId
{
"concept": "QueryGroupByExpression",
"groupElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "Product",
"propertyName": "name",
"asName": "productName"
}
}
Product.name
Product.name
dataQueryQueryLimitExpression查询分页子句
{
"concept": "QueryLimitExpression",
"pageElement": {
"concept": "NumericLiteral",
"value": "1",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
},
"pageSizeElement": {
"concept": "NumericLiteral",
"value": "1000",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}
}
page 1 size 1000
[1, 1000]
{
"concept": "QueryLimitExpression",
"pageElement": {
"concept": "Identifier",
"namespace": "",
"name": "page"
},
"pageSizeElement": {
"concept": "Identifier",
"namespace": "",
"name": "size"
}
}
page ${page} size ${size}
[page, size]
dataQuerySqlQueryComponentSQL 查询
dataQueryOqlQueryComponentSQL 查询
{
"concept": "OqlQueryComponent",
"dataSource": "app.dataSources.defaultDS",
"code": "SELECT * FROM Product WHERE createdTime > \$\{createdTime}"
}
sql"SELECT * FROM Product WHERE createdTime > ${createdTime}"
nasl.oql.query(`SELECT * FROM Product WHERE createdTime > ${createdTime}`)
{
"concept": "OqlQueryComponent",
"dataSource": "app.dataSources.defaultDS",
"code": "SELECT * FROM Product WHERE status = \$\{app.enums.StatusEnum.Normal}"
}
sql"SELECT * FROM Product WHERE status = ${app.enums.StatusEnum.Normal}"
nasl.oql.query(`SELECT * FROM Product WHERE status = ${app.enums.StatusEnum['Normal']}`)
authRole角色
{
"concept": "Role",
"name": "DEV-AdminRole",
"uuid": "e21f5120e0334cd9ac8e0181df831bfe",
"description": "可视化编辑器上添加的角色"
}
@(
uuid = "e21f5120e0334cd9ac8e0181df831bfe",
description = "可视化编辑器上添加的角色",
)
role `DEV-AdminRole`
configurationConfiguration配置管理
{
"concept": "Configuration",
"groups": [
{
"concept": "ConfigGroup",
"name": "custom",
"properties": [
{
"concept": "ConfigProperty",
"name": "url",
"description": "参数路径",
"values": [
{
"concept": "ConfigPropertyValue",
"env": "dev",
"value": "dev-domain.com"
},
{
"concept": "ConfigPropertyValue",
"env": "online",
"value": "domain.com"
}
],
"isPrivate": false
}
]
}
]
}
[编译方法未实现]
configurationConfigGroup配置组
{
"concept": "ConfigGroup",
"name": "custom",
"properties": [
{
"concept": "ConfigProperty",
"name": "url",
"description": "参数路径",
"values": [
{
"concept": "ConfigPropertyValue",
"env": "dev",
"value": "dev-domain.com"
},
{
"concept": "ConfigPropertyValue",
"env": "online",
"value": "domain.com"
}
],
"isPrivate": false
}
]
}
[编译方法未实现]
configurationConfigProperty配置属性
{
"concept": "ConfigProperty",
"name": "url",
"description": "参数路径",
"values": [
{
"concept": "ConfigPropertyValue",
"env": "dev",
"value": "dev-domain.com"
},
{
"concept": "ConfigPropertyValue",
"env": "online",
"value": "domain.com"
}
],
"isPrivate": false
}
[编译方法未实现]
configurationConfigPropertyValue配置属性值
{
"concept": "ConfigPropertyValue",
"env": "dev",
"value": "dev-domain.com"
}
[编译方法未实现]
[编译方法未实现]
configurationI18nInfo国际化信息
{
"concept": "I18nInfo",
"enabled": true,
"locale": "zh-CN",
"messageMap": {
"en-US": {
"key1": "Loading...",
"key2": "Failed to load. Please try again",
"key3": "No data",
"key4": "Load more",
"key5": "No more items"
},
"zh-CN": {
"key1": "正在加载中...",
"key2": "加载失败,请重试",
"key3": "暂无数据",
"key4": "加载更多",
"key5": "没有更多了"
}
}
}
[编译方法未实现]
assistCompletionProperty自动补全属性
assistUseComponentIDE 中使用的编辑组件
assistPoint点信息
assistRect矩形信息
assistSelectMembers选择成员
assistAssignmentLine赋值连线
processV2ProcessV2流程
processV2ProcessDefinitionV2流程定义
processV2HistoryProcessV2流程历史
processV2ProcessBindV2绑定实体或数据结构
processV2FieldPermissionV2字段权限控制详情
processV2ProcessElementV2流程元素
processV2OperatePermissionV2操作权限控制
processV2AssigneeV2经办人
processV2DepartmentV2部门用户
processV2[[ManagerV2]]主管
processV2DirectManagerV2直接主管
processV2DepartmentManagerV2部门主管
processV2FlowConditionV2流条件
processV2[[ApprovalPolicyV2]]审批策略
processV2SequentialPolicyV2依次审批
processV2CountersignPolicyV2会签
processV2OrSignPolicyV2或签