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


Java ExecUtils.convertToICursorMeta方法代码示例

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


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

示例1: HbCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public HbCursor(IndexMeta indexMeta, HbOperate hbOperate, TablePhysicalSchema physicalSchema, TableMeta schema,
                IQuery query){
    this.indexMeta = indexMeta;
    this.cursorMeta = ExecUtils.convertToICursorMeta(this.indexMeta);
    this.columnMap = new HashMap<String, ColumnMeta>();
    this.columnIndex = new HashMap<String, Integer>();
    for (ColumnMeta cm : cursorMeta.getColumns()) {
        columnMap.put(cm.getName(), cm);
        Integer index = cursorMeta.getIndex(indexMeta.getTableName(), cm.getName(), cm.getAlias());
        columnIndex.put(cm.getName(), index);
    }

    this.hbOperate = hbOperate;
    this.physicalSchema = physicalSchema;
    this.schema = schema;
    this.query = query;

}
 
开发者ID:loye168,项目名称:tddl5,代码行数:19,代码来源:HbCursor.java

示例2: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@Override
public ISchematicCursor getCursor(ExecutionContext executionContext, IndexMeta indexName, IQuery executor)
                                                                                                          throws TddlException {
    My_JdbcHandler jdbcHandler = ((My_Repository) executionContext.getCurrentRepository()).getJdbcHandler(this.dsGetter,
        executor,
        executionContext);
    ICursorMeta meta = ExecUtils.convertToICursorMeta(indexName);
    My_Cursor my_cursor = new My_Cursor(jdbcHandler, meta, executor, executor.isStreaming());
    return new SchematicMyCursor(my_cursor, meta, MysqlRepoUtils.buildOrderBy(executor, indexName));
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:11,代码来源:My_Table.java

示例3: JE_Cursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public JE_Cursor(IndexMeta meta, com.sleepycat.je.Cursor je_cursor, LockMode lockMode){
    this.indexMeta = meta;
    this.iCursorMeta = ExecUtils.convertToICursorMeta(meta);
    this.je_cursor = je_cursor;
    this.lockMode = lockMode;
    this.key_codec = CodecFactory.getInstance(CodecFactory.FIXED_LENGTH).getCodec(meta.getKeyColumns());
    if (meta.isPrimaryKeyIndex()) {
        this.value_codec = CodecFactory.getInstance(CodecFactory.FIXED_LENGTH).getCodec(meta.getValueColumns());
    } else {
        this.value_codec = CodecFactory.getInstance(CodecFactory.FIXED_LENGTH).getCodec(meta.getValueColumns());
    }
    this.key_record = key_codec.newEmptyRecord();
    this.value_record = value_codec.newEmptyRecord();
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:15,代码来源:JE_Cursor.java

示例4: DemoCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public DemoCursor(IndexMeta indexMeta, NavigableMap<Object, CloneableRecord> ccmap){
    this.ccmap = ccmap;
    this.indexMeta = indexMeta;
    this.iCursorMeta = ExecUtils.convertToICursorMeta(this.indexMeta);
    List<ColumnMeta> cmArray = indexMeta.getKeyColumns();
    if (cmArray != null) {
        if (cmArray.size() != 1) {
            throw new IllegalStateException("只支持单值索引yet");
        }

    } else {
        throw new IllegalStateException("key array is null");
    }
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:15,代码来源:DemoCursor.java

示例5: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@Override
public ISchematicCursor getCursor(ExecutionContext executionContext, IndexMeta indexName, IQuery executor)
                                                                                                          throws TddlException {
    My_JdbcHandler jdbcHandler = MysqlRepoUtils.getJdbcHandler(this.dsGetter, executor, executionContext);
    ICursorMeta meta = ExecUtils.convertToICursorMeta(indexName);
    My_Cursor my_cursor = new My_Cursor(jdbcHandler, meta, executor, executor.isStreaming());
    return new SchematicMyCursor(my_cursor, meta, MysqlRepoUtils.buildOrderBy(executor, indexName));
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:9,代码来源:My_Table.java

示例6: handle

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public ISchematicCursor handle(IDataNodeExecutor executor, ExecutionContext executionContext) throws TddlException {
    if (!canComposeOneSql(executor)) {
        return super.handle(executor, executionContext);
    }

    IndexMeta indexMeta = null;
    My_JdbcHandler jdbcHandler = MysqlRepoUtils.getJdbcHandler(dsGetter, executor, executionContext);
    ICursorMeta meta = ExecUtils.convertToICursorMeta((IQueryTree) executor);
    My_Cursor my_cursor = new My_Cursor(jdbcHandler, meta, executor, executor.isStreaming());

    // if (executor.getSql() != null) {
    // // TODO shenxun : 排序信息似乎丢了啊。。
    // return my_cursor.getResultSet();
    // }

    List<IOrderBy> orderBy = null;
    if (executor instanceof IJoin) {
        orderBy = ((IJoin) executor).getOrderBys();
    } else {
        orderBy = MysqlRepoUtils.buildOrderBy(executor, indexMeta);
    }

    orderBy = ExecUtils.copyOrderBys(orderBy);

    for (IOrderBy order : orderBy) {
        if (((IQueryTree) executor).getAlias() != null) {
            order.getColumn().setTableName(((IQueryTree) executor).getAlias());
        }
        if (order.getColumn().getAlias() != null) order.getColumn().setColumnName(order.getColumn().getAlias());
    }

    if (GeneralUtil.getExtraCmdBoolean(executionContext.getExtraCmds(), ExtraCmd.EXECUTE_QUERY_WHEN_CREATED, false)) {
        my_cursor.init();
    }
    return new SchematicMyCursor(my_cursor, meta, orderBy);
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:39,代码来源:QueryMyHandler.java

示例7: handle

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public ISchematicCursor handle(IDataNodeExecutor executor, ExecutionContext executionContext) throws TddlException {
    if (!canComposeOneSql(executor)) {
        return super.handle(executor, executionContext);
    }

    IndexMeta indexMeta = null;
    My_JdbcHandler jdbcHandler = ((My_Repository) executionContext.getCurrentRepository()).getJdbcHandler(dsGetter,
        executor,
        executionContext);
    ICursorMeta meta = ExecUtils.convertToICursorMeta((IQueryTree) executor);
    My_Cursor my_cursor = new My_Cursor(jdbcHandler, meta, executor, executor.isStreaming());

    if (executor.getSql() != null) {
        return my_cursor.getResultSet();
    }

    List<IOrderBy> orderBy = null;
    if (executor instanceof IJoin) {
        orderBy = ((IJoin) executor).getOrderBys();
    } else {
        orderBy = MysqlRepoUtils.buildOrderBy(executor, indexMeta);
    }

    orderBy = ExecUtils.copyOrderBys(orderBy);

    for (IOrderBy order : orderBy) {
        if (((IQueryTree) executor).getAlias() != null) {
            order.getColumn().setTableName(((IQueryTree) executor).getAlias());
        }
        if (order.getColumn().getAlias() != null) order.getColumn().setColumnName(order.getColumn().getAlias());
    }

    if (!executor.lazyLoad()) {
        my_cursor.init();
    }

    ISchematicCursor cursor = new SchematicMyCursor(my_cursor, meta, orderBy);
    if (((IQueryTree) executor).getSubqueryFilter() != null) {
        cursor = executionContext.getCurrentRepository()
            .getCursorFactory()
            .valueFilterCursor(executionContext, cursor, ((IQueryTree) executor).getSubqueryFilter());
    }
    return cursor;
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:47,代码来源:QueryMyHandler.java


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