Skip to main content
Version: Latest(3.11)

OqlQueryComponent SQL 查询

1. 结构声明

class OqlQueryComponent extends LogicItem {
code: string;
dataSource: string;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "OqlQueryComponent",
"dataSource": "app.dataSources.defaultDS",
"code": "SELECT * FROM Product WHERE createdTime > \\$\\{createdTime}"
}

对应的代码如下:

sql"SELECT * FROM Product WHERE createdTime > \$\{createdTime}"

(2) 示例

AST 如下:

{
"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}"