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


Java ExecUtils.getColumn方法代码示例

本文整理汇总了Java中com.taobao.tddl.executor.utils.ExecUtils.getColumn方法的典型用法代码示例。如果您正苦于以下问题:Java ExecUtils.getColumn方法的具体用法?Java ExecUtils.getColumn怎么用?Java ExecUtils.getColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.taobao.tddl.executor.utils.ExecUtils的用法示例。


在下文中一共展示了ExecUtils.getColumn方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: manageToBooleanRangeCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected ISchematicCursor manageToBooleanRangeCursor(ExecutionContext executionContext, ISchematicCursor cursor,
                                                      IRepository repo, IFilter keyFilter) throws TddlException {
    IBooleanFilter bf = (IBooleanFilter) keyFilter;
    IColumn c = ExecUtils.getColumn(bf.getColumn());
    OPERATION op = bf.getOperation();
    if (op == OPERATION.IN) {
        List<Object> values = bf.getValues();
        if (values == null) {
            throw new IllegalArgumentException("values is null ,but operation is in . logical error");
        } else {
            return repo.getCursorFactory().inCursor(executionContext, cursor, cursor.getOrderBy(), c, values, op);
        }
    }
    try {
        cursor = repo.getCursorFactory().rangeCursor(executionContext, cursor, keyFilter);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    return cursor;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:21,代码来源:QueryHandler.java

示例2: manageToBooleanRangeCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected ISchematicCursor manageToBooleanRangeCursor(ISchematicCursor cursor, IRepository repo, IFilter keyFilter,
                                                      ExecutionContext executionContext) throws TddlException {
    IBooleanFilter bf = (IBooleanFilter) keyFilter;
    IColumn c = ExecUtils.getColumn(bf.getColumn());
    OPERATION op = bf.getOperation();
    if (op == OPERATION.IN) {
        List<Object> values = bf.getValues();
        if (values == null) {
            throw new IllegalArgumentException("values is null ,but operation is in . logical error");
        } else {
            return repo.getCursorFactory().inCursor(executionContext, cursor, cursor.getOrderBy(), c, values, op);
        }
    }
    try {
        cursor = repo.getCursorFactory().rangeCursor(executionContext, cursor, keyFilter);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    return cursor;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:21,代码来源:HbQueryHandler.java

示例3: getOrderBy

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
/**
 * 根据列名,生成order by 条件.永远是正向。
 * 
 * @param columns
 * @return
 */
protected static final List<IOrderBy> getOrderBy(List<ISelectable> columns) {
    if (columns == null) {
        columns = Collections.EMPTY_LIST;
    }
    List<IOrderBy> orderBys = new ArrayList<IOrderBy>(columns.size());
    for (Object cobj : columns) {
        IColumn c = ExecUtils.getColumn(cobj);
        orderBys.add(ASTNodeFactory.getInstance().createOrderBy().setColumn(c).setDirection(true));
    }
    return orderBys;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:18,代码来源:QueryHandlerCommon.java

示例4: getOrderBy

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected static final List<IOrderBy> getOrderBy(List columns) {
    if (columns == null) {
        columns = Collections.EMPTY_LIST;
    }
    List<IOrderBy> orderBys = new ArrayList<IOrderBy>(columns.size());
    for (Object cobj : columns) {
        IColumn c = ExecUtils.getColumn(cobj);
        orderBys.add(ASTNodeFactory.getInstance().createOrderBy().setColumn(c).setDirection(true));
    }
    return orderBys;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:12,代码来源:MysqlRepoUtils.java

示例5: equalsIOrderBy

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
/**
 * 左数据集和右数据集,排序是否相同。
 * 
 * @param o1
 * @param o2
 * @return
 */
protected boolean equalsIOrderBy(IOrderBy o1, IOrderBy o2) {
    IColumn c1 = ExecUtils.getColumn(o1.getColumn());
    IColumn c2 = ExecUtils.getColumn(o2.getColumn());
    return StringUtils.equalsIgnoreCase(c1.getTableName(), c2.getTableName())
           && c1.getColumnName().equals(c2.getColumnName()) && o1.getDirection() == o2.getDirection();
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:14,代码来源:QueryHandlerCommon.java


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