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


Java ColumnBase类代码示例

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


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

示例1: encodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static int encodeTableColumnAttrs(ColumnBase column) {

        int out = column.getNullability();    // always between 0x00 and 0x02

        if (column.isIdentity()) {
            out |= 0x00000004;
        }

        if (column.isWriteable()) {
            out |= 0x00000008;
        }

        if (column.isSearchable()) {
            out |= 0x00000010;
        }

        return out;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:ResultMetaData.java

示例2: newEmptyResultSet

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static JDBCResultSet newEmptyResultSet() {
    ResultMetaData md = ResultMetaData.newResultMetaData(1);

    ColumnBase column =
        new ColumnBase(null, null, null, "C1");
    column.setType(Type.SQL_INTEGER);
    md.columnTypes[0] = Type.SQL_INTEGER;

    md.columns[0] = column;

    Result r = Result.newSingleColumnResult(md);

    return newJDBCResultSet(r, md);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:15,代码来源:JDBCResultSet.java

示例3: getTableOidForColumn

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static int getTableOidForColumn(int colIndex, ResultMetaData md) {
    if (!md.isTableColumn(colIndex)) {
        return 0;
    }
    ColumnBase col = md.columns[colIndex];
    int hashCode = (col.getSchemaNameString() + '.'
        + col.getTableNameString()).hashCode();
    if (hashCode < 0) {
        hashCode *= -1;
    }
    return hashCode;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:13,代码来源:OdbcUtil.java

示例4: newResultMetaData

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static ResultMetaData newResultMetaData(Type[] types,
        int[] baseColumnIndexes, int colCount, int extColCount) {

    ResultMetaData md = new ResultMetaData(RESULT_METADATA);

    md.columnLabels        = new String[colCount];
    md.columns             = new ColumnBase[colCount];
    md.columnTypes         = types;
    md.colIndexes          = baseColumnIndexes;
    md.columnCount         = colCount;
    md.extendedColumnCount = extColCount;

    return md;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:15,代码来源:ResultMetaData.java

示例5: decodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static void decodeTableColumnAttrs(int in, ColumnBase column) {

        column.setNullability((byte) (in & 0x00000003));
        column.setIdentity((in & 0x00000004) != 0);
        column.setWriteable((in & 0x00000008) != 0);
        column.setSearchable((in & 0x00000010) != 0);
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:8,代码来源:ResultMetaData.java

示例6: newEptyResultSet

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static JDBCResultSet newEptyResultSet() {
    ResultMetaData md = ResultMetaData.newResultMetaData(1);

    ColumnBase column =
        new ColumnBase(null, null, null, "C1");
    column.setType(Type.SQL_INTEGER);
    md.columnTypes[0] = Type.SQL_INTEGER;

    md.columns[0] = column;

    Result r = Result.newSingleColumnResult(md);

    return newJDBCResultSet(r, md);
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:15,代码来源:JDBCResultSet.java

示例7: encodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static int encodeTableColumnAttrs(ColumnBase column) {

        int out = column.getNullability();    // always between 0x00 and 0x02

        if (column.isIdentity()) {
            out |= 0x00000004;
        }

        if (column.isWriteable()) {
            out |= 0x00000008;
        }

        return out;
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:15,代码来源:ResultMetaData.java

示例8: newColumnResult

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private Result newColumnResult(long position,
                               int count) throws SQLException {

    if (!JDBCClobClient.isInLimits(data.length, position, count)) {
        throw JDBCUtil.outOfRangeArgument();
    }

    Type[] types = new Type[2];

    types[0] = Type.SQL_INTEGER;
    types[1] = elementType;

    ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);

    meta.columnLabels = new String[] {
        "C1", "C2"
    };
    meta.colIndexes   = new int[] {
        -1, -1
    };
    meta.columns      = new ColumnBase[2];

    for (int i = 0; i < meta.columns.length; i++) {
        ColumnBase column = new ColumnBase("", "", "", "");

        column.setType(types[i]);

        meta.columns[i] = column;
    }

    RowSetNavigatorClient navigator = new RowSetNavigatorClient();

    for (int i = (int) position; i < position + count; i++) {
        Object[] rowData = new Object[2];

        rowData[0] = Integer.valueOf(i + 1);
        rowData[1] = data[i];

        navigator.add(rowData);
    }

    Result result = Result.newDataResult(meta);

    result.setNavigator(navigator);

    return result;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:48,代码来源:JDBCArrayBasic.java

示例9: decodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static void decodeTableColumnAttrs(int in, ColumnBase column) {
    column.setNullability((byte) (in & 0x0000000f));
    column.setIdentity((in & 0x00000010) != 0);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:5,代码来源:ResultMetaData.java

示例10: newColumnResult

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private Result newColumnResult(long position,
                               int count) throws SQLException {

    if (!JDBCClobClient.isInLimits(data.length, position, count)) {
        throw Util.outOfRangeArgument();
    }

    Type[] types = new Type[2];

    types[0] = Type.SQL_INTEGER;
    types[1] = elementType;

    ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);

    meta.columnLabels = new String[] {
        "C1", "C2"
    };
    meta.colIndexes   = new int[] {
        -1, -1
    };
    meta.columns      = new ColumnBase[2];

    for (int i = 0; i < meta.columns.length; i++) {
        ColumnBase column = new ColumnBase("", "", "", "");

        column.setType(types[i]);

        meta.columns[i] = column;
    }

    RowSetNavigatorClient navigator = new RowSetNavigatorClient();

    for (int i = (int) position; i < position + count; i++) {
        Object[] rowData = new Object[2];

        rowData[0] = Integer.valueOf(i + 1);
        rowData[1] = data[i];

        navigator.add(rowData);
    }

    Result result = Result.newDataResult(meta);

    result.setNavigator(navigator);

    return result;
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:48,代码来源:JDBCArrayBasic.java

示例11: decodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static void decodeTableColumnAttrs(int in, ColumnBase column) {

        column.setNullability((byte) (in & 0x00000003));
        column.setIdentity((in & 0x00000004) != 0);
        column.setWriteable((in & 0x00000008) != 0);
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:7,代码来源:ResultMetaData.java

示例12: newSingleColumnMetaData

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static ResultMetaData newSingleColumnMetaData(String colName) {

        ResultMetaData md = ResultMetaData.newResultMetaData(1);

        md.columns[0] = new ColumnBase(null, null, null, colName);

        md.columns[0].setType(Type.SQL_VARCHAR_DEFAULT);
        md.prepareData();

        return md;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:12,代码来源:ResultMetaData.java

示例13: encodeTableColumnAttrs

import org.hsqldb.ColumnBase; //导入依赖的package包/类
private static int encodeTableColumnAttrs(ColumnBase column) {

        int out = column.getNullability();    // always between 0x00 and 0x02

        if (column.isIdentity()) {
            out |= 0x00000010;
        }

        return out;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:11,代码来源:ResultMetaData.java

示例14: newSingleColumnResult

import org.hsqldb.ColumnBase; //导入依赖的package包/类
public static Result newSingleColumnResult(String colName, Type type) {

        Result result = newResult(ResultConstants.DATA);

        result.metaData            = ResultMetaData.newResultMetaData(1);
        result.metaData.columns[0] = new ColumnBase(null, null, null, colName);

        result.metaData.columns[0].setType(type);
        result.metaData.prepareData();

        //
        result.navigator = new RowSetNavigatorClient(8);

        return result;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:16,代码来源:Result.java


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