当前位置: 首页>>代码示例>>Java>>正文


Java ASTNode.build方法代码示例

本文整理汇总了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();
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:22,代码来源:MergeNodeBuilder.java

示例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();
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:24,代码来源:QueryNodeBuilder.java

示例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();
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:21,代码来源:MergeNodeBuilder.java

示例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();
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:23,代码来源:QueryNodeBuilder.java

示例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;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:33,代码来源:CostBasedOptimizer.java

示例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;
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:28,代码来源:CostBasedOptimizer.java


注:本文中的com.taobao.tddl.optimizer.core.ast.ASTNode.build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。