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


Java ExecUtils.getOrderBy方法代码示例

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


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

示例1: buildOrderBy

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public static List<IOrderBy> buildOrderBy(IDataNodeExecutor executor, IndexMeta indexMeta, String tableName) {
    IQuery query = ((IQuery) executor);
    List<IOrderBy> orderBy = null;
    orderBy = query.getOrderBys();
    if (orderBy == null || orderBy.isEmpty()) {
        List<IOrderBy> groupBys = query.getGroupBys();
        orderBy = groupBys;
    }
    if (orderBy == null || orderBy.isEmpty()) {
        orderBy = ExecUtils.getOrderBy(indexMeta);
    }
    List<IOrderBy> orderbys = ExecUtils.copyOrderBys(orderBy);

    return orderbys;

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

示例2: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public ISchematicCursor getCursor(ITransaction txn, IndexMeta indexMeta, String isolation, String actualTableName)
                                                                                                                  throws TddlException {
    Database db = getDatabase(actualTableName);
    if (db == null) {
        throw new IllegalArgumentException("table don't contains indexName:" + actualTableName);
    }
    CursorConfig cc = CursorConfig.DEFAULT;
    LockMode lm = LockMode.DEFAULT;
    if (txn != null) {
        com.sleepycat.je.TransactionConfig _config = ((JE_Transaction) txn).config;
        if (_config.getReadUncommitted()) {
            cc = CursorConfig.READ_UNCOMMITTED;
            lm = LockMode.READ_UNCOMMITTED;
        } else if (_config.getReadCommitted()) {
            cc = CursorConfig.READ_COMMITTED;
            // lm = LockMode.READ_COMMITTED;
        }
    } else {
        if (Isolation.READ_COMMITTED.equals(isolation)) {
            cc = CursorConfig.READ_COMMITTED;
            // lm = LockMode.READ_COMMITTED;//not support
        } else if (Isolation.READ_UNCOMMITTED.equals(isolation)) {
            cc = CursorConfig.READ_UNCOMMITTED;
            lm = LockMode.READ_UNCOMMITTED;
        } else if (Isolation.REPEATABLE_READ.equals(isolation)) {
            // default
        } else if (Isolation.SERIALIZABLE.equals(isolation)) {
            // txn_config
        }
    }
    JE_Cursor je_cursor = new JE_Cursor(indexMeta, db.openCursor(txn == null ? null : ((JE_Transaction) txn).txn,
        cc), lm);
    if (txn != null) {
        ((JE_Transaction) txn).addCursor(je_cursor);
    }
    return new SchematicCursor(je_cursor, je_cursor.getiCursorMeta(), ExecUtils.getOrderBy(indexMeta));
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:38,代码来源:JE_Table.java

示例3: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
public ISchematicCursor getCursor(ITransaction txn, IndexMeta indexMeta, String isolation, String actualTableName)
                                                                                                                  throws TddlException {
    Database db = getDatabase(actualTableName);
    if (db == null) {
        throw new TddlException("table don't contains indexName:" + actualTableName);
    }
    CursorConfig cc = CursorConfig.DEFAULT;
    LockMode lm = LockMode.DEFAULT;
    if (txn != null) {
        com.sleepycat.je.TransactionConfig _config = ((JE_Transaction) txn).config;
        if (_config.getReadUncommitted()) {
            cc = CursorConfig.READ_UNCOMMITTED;
            lm = LockMode.READ_UNCOMMITTED;
        } else if (_config.getReadCommitted()) {
            cc = CursorConfig.READ_COMMITTED;
            // lm = LockMode.READ_COMMITTED;
        }
    } else {
        if (Isolation.READ_COMMITTED.equals(isolation)) {
            cc = CursorConfig.READ_COMMITTED;
            // lm = LockMode.READ_COMMITTED;//not support
        } else if (Isolation.READ_UNCOMMITTED.equals(isolation)) {
            cc = CursorConfig.READ_UNCOMMITTED;
            lm = LockMode.READ_UNCOMMITTED;
        } else if (Isolation.REPEATABLE_READ.equals(isolation)) {
            // default
        } else if (Isolation.SERIALIZABLE.equals(isolation)) {
            // txn_config
        }
    }
    JE_Cursor je_cursor = new JE_Cursor(indexMeta,

    db.openCursor(txn == null ? null : ((JE_Transaction) txn).txn, cc), lm);
    if (txn != null) {
        ((JE_Transaction) txn).addCursor(je_cursor);
    }
    return new SchematicCursor(je_cursor, je_cursor.getiCursorMeta(), ExecUtils.getOrderBy(indexMeta));
}
 
开发者ID:beebeandwer,项目名称:TDDL,代码行数:39,代码来源:JE_Table.java

示例4: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@Override
public ISchematicCursor getCursor(ExecutionContext executionContext, IndexMeta indexMeta, String indexMetaName) {
    DemoCursor dc = new DemoCursor(indexMeta, map);
    return new SchematicCursor(dc, dc.getiCursorMeta(), ExecUtils.getOrderBy(indexMeta));
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:6,代码来源:DemoTable.java

示例5: getCursor

import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
@Override
public ISchematicCursor getCursor(ExecutionContext executionContext, IndexMeta meta, IQuery iQuery)
                                                                                                   throws TddlException {
    HbCursor hc = new HbCursor(meta, this.hbOperate, this.physicalSchema, this.schema, iQuery);
    return new SchematicCursor(hc, hc.getCursorMeta(), ExecUtils.getOrderBy(meta));
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:7,代码来源:HbTable.java


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