QueryLimitExpression 查询分页子句
1. 结构声明
- TS Declaration
- JSON Schema
class QueryLimitExpression extends LogicItem {
pageElement: LogicItem;
pageSizeElement: LogicItem;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"changedTime": {
"$ref": "#/definitions/long"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"breakpoint": {
"type": "string",
"enum": [
"ENABLED",
"DISABLED"
]
},
"pageElement": {
"$ref": "#/definitions/LogicItem"
},
"pageSizeElement": {
"$ref": "#/definitions/LogicItem"
}
},
"required": [
"pageElement",
"pageSizeElement"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"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": {}
}
}
}
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: {}
对应的代码如下:
- 文本化 NASL
- Natural TS
page 1 size 1000
[1, 1000]
(2) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryLimitExpression",
"pageElement": {
"concept": "Identifier",
"namespace": "",
"name": "page"
},
"pageSizeElement": {
"concept": "Identifier",
"namespace": "",
"name": "size"
}
}
concept: QueryLimitExpression
pageElement:
concept: Identifier
namespace: ""
name: page
pageSizeElement:
concept: Identifier
namespace: ""
name: size
对应的代码如下:
- 文本化 NASL
- Natural TS
page \$\{page} size \$\{size}
[page, size]