OqlQueryComponent SQL 查询
1. 结构声明
- TS Declaration
- JSON Schema
class OqlQueryComponent extends LogicItem {
code: string;
typeAnnotation?: TypeAnnotation;
dataSource: string;
}
{
"type": "object",
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"code": {
"type": "string"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"dataSource": {
"type": "string"
}
},
"required": [
"code",
"dataSource"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "OqlQueryComponent",
"dataSource": "app.dataSources.defaultDS",
"code": "SELECT * FROM Product WHERE createdTime > \\$\\{createdTime}"
}
concept: OqlQueryComponent
dataSource: app.dataSources.defaultDS
code: SELECT * FROM Product WHERE createdTime > \\$\\{createdTime}
(2) 示例
AST 如下:
- JSON
- YAML
{
"concept": "OqlQueryComponent",
"dataSource": "app.dataSources.defaultDS",
"code": "SELECT * FROM Product WHERE status = \\$\\{app.enums.StatusEnum.Normal}"
}
concept: OqlQueryComponent
dataSource: app.dataSources.defaultDS
code: SELECT * FROM Product WHERE status = \\$\\{app.enums.StatusEnum.Normal}