QueryFieldExpression 查询属性
1. 结构声明
- TS Declaration
- JSON Schema
class QueryFieldExpression extends LogicItem {
isDotStar: boolean = false;
asName?: string;
entityAsName: string;
propertyName: string;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"isDotStar": {
"type": "boolean"
},
"asName": {
"type": "string"
},
"entityAsName": {
"type": "string"
},
"propertyName": {
"type": "string"
}
},
"required": [
"isDotStar",
"entityAsName",
"propertyName"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryFieldExpression",
"isDotStar": true,
"entityAsName": "OrderProduct",
"propertyName": "",
"asName": ""
}
concept: QueryFieldExpression
isDotStar: true
entityAsName: OrderProduct
propertyName: ""
asName: ""
对应的代码如下:
- 文本化 NASL
- Natural TS
OrderProduct
OrderProduct
(2) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
}
concept: QueryFieldExpression
isDotStar: false
entityAsName: OrderProduct
propertyName: amount
asName: ""
对应的代码如下:
- 文本化 NASL
- Natural TS
OrderProduct.amount
OrderProduct.amount