Skip to main content
Version: 3.6

QueryJoinExpression 查询 Join 子句

1. 结构声明

class QueryJoinExpression extends LogicItem {
entityNamespace: string;
entityName: string;
asName: string;
joinType: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
onExpressions: Array<BinaryExpression>;
joinParts: Array<QueryJoinExpression>;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "QueryJoinExpression",
"entityNamespace": "app.dataSources.defaultDS.entities",
"entityName": "OrderForm",
"joinType": "INNER",
"onExpressions": [
{
"concept": "BinaryExpression",
"left": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "orderId",
"asName": ""
},
"right": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderForm",
"propertyName": "id",
"asName": ""
},
"operator": "=="
}
],
"joinParts": [],
"asName": ""
}

对应的代码如下:

inner join OrderForm in OrderForm
on OrderProduct.orderId == OrderForm.id