本文整理汇总了Java中com.taobao.tddl.optimizer.core.ast.ASTNode.build方法的典型用法代码示例。如果您正苦于以下问题:Java ASTNode.build方法的具体用法?Java ASTNode.build怎么用?Java ASTNode.build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.tddl.optimizer.core.ast.ASTNode
的用法示例。
在下文中一共展示了ASTNode.build方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: build
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
@Override
public void build() {
for (ASTNode sub : this.getNode().getChildren()) {
sub.build();
}
this.buildExistSequenceVal();
if (!(this.getNode().getChild() instanceof QueryTreeNode)) {
return;
}
this.buildAlias();
this.buildSelected();
this.buildWhere();
this.buildGroupBy();
this.buildOrderBy();
this.buildHaving();
this.buildFunction();
this.buildExistAggregate();
// 最后一个处理
this.buildLimit();
}
示例2: build
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
public void build() {
for (ASTNode sub : this.getNode().getChildren()) {
sub.build();
}
if (!(this.getNode().getChild() instanceof QueryTreeNode)) {// 嵌套子类
return;
}
this.buildAlias();
this.buildSelected();
this.buildWhere();
this.buildGroupBy();
this.buildOrderBy();
if (this.getNode().getDataNode() == null) {
this.getNode().executeOn(this.getNode().getChild().getDataNode());
}
this.buildExistAggregate();
this.buildExistSequenceVal();
}
示例3: build
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
@Override
public void build() {
for (ASTNode sub : this.getNode().getChildren()) {
sub.build();
}
if (!(this.getNode().getChild() instanceof QueryTreeNode)) {
return;
}
this.buildAlias();
this.buildSelected();
this.buildWhere();
this.buildGroupBy();
this.buildOrderBy();
this.buildHaving();
this.buildLimit();
this.buildFunction();
this.buildExistAggregate();
}
示例4: build
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
public void build() {
for (ASTNode sub : this.getNode().getChildren()) {
sub.build();
}
if (!(this.getNode().getChild() instanceof QueryTreeNode)) {// 嵌套子类
return;
}
this.buildAlias();
this.buildSelected();
this.buildWhere();
this.buildGroupBy();
this.buildOrderBy();
if (this.getNode().getDataNode() == null) {
this.getNode().executeOn(this.getNode().getChild().getDataNode());
}
this.buildExistAggregate();
}
示例5: optimize
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
private ASTNode optimize(ASTNode node, Parameters parameterSettings, Map<String, Object> extraCmd) {
// 先调用一次build,完成select字段信息的推导
node.build();
ASTNode optimized = node;
try {
if (node instanceof QueryTreeNode) {
optimized = this.optimizeQuery((QueryTreeNode) node, extraCmd);
}
if (node instanceof InsertNode) {
optimized = this.optimizeInsert((InsertNode) node, extraCmd);
}
else if (node instanceof DeleteNode) {
optimized = this.optimizeDelete((DeleteNode) node, extraCmd);
}
else if (node instanceof UpdateNode) {
optimized = this.optimizeUpdate((UpdateNode) node, extraCmd);
}
else if (node instanceof PutNode) {
optimized = this.optimizePut((PutNode) node, extraCmd);
}
} catch (EmptyResultFilterException e) {
e.setAstNode(optimized); // 设置上下文
throw e;
}
return optimized;
}
示例6: optimize
import com.taobao.tddl.optimizer.core.ast.ASTNode; //导入方法依赖的package包/类
public ASTNode optimize(ASTNode node, Map<Integer, ParameterContext> parameterSettings, Map<String, Object> extraCmd)
throws QueryException {
// 先调用一次build,完成select字段信息的推导
node.build();
ASTNode optimized = null;
if (node instanceof QueryTreeNode) {
optimized = this.optimizeQuery((QueryTreeNode) node, extraCmd);
}
if (node instanceof InsertNode) {
optimized = this.optimizeInsert((InsertNode) node, extraCmd);
}
else if (node instanceof DeleteNode) {
optimized = this.optimizeDelete((DeleteNode) node, extraCmd);
}
else if (node instanceof UpdateNode) {
optimized = this.optimizeUpdate((UpdateNode) node, extraCmd);
}
else if (node instanceof PutNode) {
optimized = this.optimizePut((PutNode) node, extraCmd);
}
return optimized;
}