QueryOrderByExpression 查询排序子句
1. 结构声明
- TS Declaration
- JSON Schema
class QueryOrderByExpression extends LogicItem {
orderElement: LogicItem;
order: LogicItem;
}
{
"type": "object",
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"orderElement": {
"$ref": "#/definitions/LogicItem"
},
"order": {
"$ref": "#/definitions/LogicItem"
}
},
"required": [
"orderElement",
"order"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "Identifier",
"namespace": "",
"name": "sort"
},
"order": {
"concept": "Identifier",
"namespace": "",
"name": "order"
}
}
concept: QueryOrderByExpression
orderElement:
concept: Identifier
namespace: ""
name: sort
order:
concept: Identifier
namespace: ""
name: order
(2) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "Product",
"propertyName": "createdTime",
"asName": ""
},
"order": {
"concept": "StringLiteral",
"value": "DESC"
}
}
concept: QueryOrderByExpression
orderElement:
concept: QueryFieldExpression
isDotStar: false
entityAsName: Product
propertyName: createdTime
asName: ""
order:
concept: StringLiteral
value: DESC
(3) 示例
AST 如下:
- JSON
- YAML
{
"concept": "QueryOrderByExpression",
"orderElement": {
"concept": "Identifier",
"namespace": "inner",
"name": "productName"
},
"order": {
"concept": "StringLiteral",
"value": "ASC"
}
}
concept: QueryOrderByExpression
orderElement:
concept: Identifier
namespace: inner
name: productName
order:
concept: StringLiteral
value: ASC