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


Java Type.emptyArray方法代码示例

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


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

示例1: TableDerived

import org.hsqldb.types.Type; //导入方法依赖的package包/类
public TableDerived(Database database, HsqlName name, int type,
                    Type[] columnTypes, HashMappedList columnList,
                    QueryExpression queryExpression) {

    this(database, name, type, queryExpression);

    this.colTypes          = columnTypes;
    this.columnList        = columnList;
    columnCount            = columnList.size();
    primaryKeyCols         = ValuePool.emptyIntArray;
    primaryKeyTypes        = Type.emptyArray;
    primaryKeyColsSequence = ValuePool.emptyIntArray;
    colDefaults            = new Expression[columnCount];
    colNotNull             = new boolean[columnCount];
    defaultColumnMap       = new int[columnCount];

    ArrayUtil.fillSequence(defaultColumnMap);

    bestIndexForColumn = new int[colTypes.length];

    ArrayUtil.fillArray(bestIndexForColumn, -1);
    createPrimaryIndex(primaryKeyCols, primaryKeyTypes, null);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:24,代码来源:TableDerived.java

示例2: TableBase

import org.hsqldb.types.Type; //导入方法依赖的package包/类
public TableBase(Session session, Database database, int scope, int type,
                 Type[] colTypes) {

    tableType        = type;
    persistenceScope = scope;
    isSessionBased   = true;
    persistenceId    = database.persistentStoreCollection.getNextId();
    this.database    = database;
    this.colTypes    = colTypes;
    columnCount      = colTypes.length;
    primaryKeyCols   = new int[]{};
    primaryKeyTypes  = Type.emptyArray;
    indexList        = Index.emptyArray;

    createPrimaryIndex(primaryKeyCols, primaryKeyTypes, null);
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:TableBase.java

示例3: StatementPortal

import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
 * Instantiates a proxy ODBC StatementPortal object for the
 * Connection Session, and adds the new instance to the specified map.
 *
 * @param paramObjs Param values are either String or BinaryData instances
 */
public StatementPortal(String handle, OdbcPreparedStatement odbcPs,
                       Object[] paramObjs,
                       Map containingMap) throws RecoverableOdbcFailure {

    this.handle        = handle;
    lcQuery            = odbcPs.query.toLowerCase();
    ackResult          = odbcPs.ackResult;
    session            = odbcPs.session;
    this.containingMap = containingMap;

    Type[] paramTypes = Type.emptyArray;

    switch (ackResult.getType()) {

        case ResultConstants.PREPARE_ACK :
            break;

        case ResultConstants.ERROR :
            throw new RecoverableOdbcFailure(ackResult);
        default :
            throw new RecoverableOdbcFailure(
                "Output Result from secondary Statement prep is of "
                + "unexpected type: " + ackResult.getType());
    }

    if (paramObjs.length < 1) {
        parameters = new Object[0];
    } else {
        ResultMetaData pmd = odbcPs.ackResult.parameterMetaData;

        if (pmd == null) {
            throw new RecoverableOdbcFailure("No metadata for Result ack");
        }

        paramTypes = pmd.getParameterTypes();

        if (paramTypes.length != paramObjs.length) {
            throw new RecoverableOdbcFailure(
                null,
                "Client didn't specify all " + paramTypes.length
                + " parameters (" + paramObjs.length + ')', "08P01");
        }

        parameters = new Object[paramObjs.length];

        try {
            for (int i = 0; i < parameters.length; i++) {
                parameters[i] = (paramObjs[i] instanceof String)
                                ? PgType.getPgType(
                                    paramTypes[i], true).getParameter(
                                    (String) paramObjs[i], session)
                                : paramObjs[i];
            }
        } catch (java.sql.SQLException se) {
            throw new RecoverableOdbcFailure("Typing failure: " + se);
        }
    }

    bindResult = Result.newPreparedExecuteRequest(paramTypes,
            odbcPs.ackResult.getStatementID());

    containingMap.put(handle, this);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:70,代码来源:StatementPortal.java


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