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


Java ResultMetaData类代码示例

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


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

示例1: createBlob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public long createBlob(Session session, long length) {

        writeLock.lock();

        try {
            Long           lobID  = getNewLobID();
            ResultMetaData meta   = createLob.getParametersMetaData();
            Object[]       params = new Object[meta.getColumnCount()];

            params[LOB_IDS.LOB_ID]          = lobID;
            params[LOB_IDS.LOB_LENGTH]      = ValuePool.getLong(length);
            params[LOB_IDS.LOB_USAGE_COUNT] = ValuePool.INTEGER_0;
            params[LOB_IDS.LOB_TYPE]        = ValuePool.getInt(Types.SQL_BLOB);

            Result result = sysLobSession.executeCompiledStatement(createLob,
                params, 0);

            usageChanged = true;

            return lobID.longValue();
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:25,代码来源:LobManager.java

示例2: createClob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public long createClob(Session session, long length) {

        writeLock.lock();

        try {
            Long           lobID  = getNewLobID();
            ResultMetaData meta   = createLob.getParametersMetaData();
            Object[]       params = new Object[meta.getColumnCount()];

            params[LOB_IDS.LOB_ID]          = lobID;
            params[LOB_IDS.LOB_LENGTH]      = ValuePool.getLong(length);
            params[LOB_IDS.LOB_USAGE_COUNT] = ValuePool.INTEGER_0;
            params[LOB_IDS.LOB_TYPE]        = ValuePool.getInt(Types.SQL_CLOB);

            Result result = sysLobSession.executeCompiledStatement(createLob,
                params, 0);

            usageChanged = true;

            return lobID.longValue();
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:25,代码来源:LobManager.java

示例3: deleteLob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public Result deleteLob(long lobID) {

        writeLock.lock();

        try {
            ResultMetaData meta   = deleteLobCall.getParametersMetaData();
            Object[]       params = new Object[meta.getColumnCount()];

            params[0] = ValuePool.getLong(lobID);
            params[1] = ValuePool.getLong(0);

            Result result =
                sysLobSession.executeCompiledStatement(deleteLobCall, params,
                    0);

            usageChanged = true;

            return result;
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:LobManager.java

示例4: createFullBlockAddresses

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
private Result createFullBlockAddresses(long lobID, int offset,
        int count) {

    ResultMetaData meta = createSingleLobPartCall.getParametersMetaData();
    Object         params[] = new Object[meta.getColumnCount()];

    params[ALLOC_BLOCKS.BLOCK_COUNT]  = ValuePool.getInt(count);
    params[ALLOC_BLOCKS.BLOCK_OFFSET] = ValuePool.getInt(offset);
    params[ALLOC_BLOCKS.LOB_ID]       = ValuePool.getLong(lobID);

    Result result =
        sysLobSession.executeCompiledStatement(createSingleLobPartCall,
            params, 0);

    return result;
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:LobManager.java

示例5: createClob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public long createClob(long length) {

        long           lobID    = getNewLobID(sysLobSession);
        ResultMetaData meta     = createLob.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = Long.valueOf(lobID);
        params[1] = Long.valueOf(length);
        params[2] = Long.valueOf(1);
        params[3] = Integer.valueOf(Types.SQL_CLOB);

        Result result = sysLobSession.executeCompiledStatement(createLob,
            params);

        return lobID;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:LobManager.java

示例6: createPart

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
private Result createPart(long lobID, long partOffset, int dataLength,
                          int byteLength, int blockOffset,
                          int blockCount) {

    ResultMetaData meta   = createPart.getParametersMetaData();
    Object[]       params = new Object[meta.getColumnCount()];

    params[ALLOC_PART.BLOCK_COUNT]  = ValuePool.getInt(blockCount);
    params[ALLOC_PART.BLOCK_OFFSET] = ValuePool.getInt(blockOffset);
    params[ALLOC_PART.PART_OFFSET]  = ValuePool.getLong(partOffset);
    params[ALLOC_PART.PART_LENGTH]  = ValuePool.getLong(dataLength);
    params[ALLOC_PART.PART_BYTES]   = ValuePool.getLong(byteLength);
    params[ALLOC_PART.LOB_ID]       = ValuePool.getLong(lobID);

    Result result = sysLobSession.executeCompiledStatement(createPart,
        params, 0);

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

示例7: init

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
/**
 *  Initializes this JDBCResultSetMetaData object from the specified
 *  Result and HsqlProperties objects.
 *
 *  @param meta the ResultMetaData object from which to initialize this
 *         JDBCResultSetMetaData object
 *  @param conn the JDBCConnection
 *  @throws SQLException if a database access error occurs
 */
void init(ResultMetaData meta, JDBCConnection conn) throws SQLException {

    resultMetaData = meta;
    columnCount    = resultMetaData.getColumnCount();

    // fredt -  props is null for internal connections, so always use the
    //          default behaviour in this case
    // JDBCDriver.getPropertyInfo says
    // default is true
    useColumnName = true;

    if (conn == null) {
        return;
    }

    useColumnName    = conn.isUseColumnName;
    translateTTIType = conn.isTranslateTTIType;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:28,代码来源:JDBCResultSetMetaData.java

示例8: deleteLob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public Result deleteLob(long lobID) {

        writeLock.lock();

        try {
            ResultMetaData meta     = deleteLobCall.getParametersMetaData();
            Object         params[] = new Object[meta.getColumnCount()];

            params[0] = ValuePool.getLong(lobID);
            params[1] = ValuePool.getLong(0);

            Result result =
                sysLobSession.executeCompiledStatement(deleteLobCall, params,
                    0);

            usageChanged = true;

            return result;
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:23,代码来源:LobManager.java

示例9: JDBCResultSet

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public JDBCResultSet(JDBCConnection conn, Result r,
                     ResultMetaData metaData) {

    this.session    = conn == null ? null
                                   : conn.sessionProxy;
    this.result     = r;
    this.connection = conn;
    rsProperties    = r.rsProperties;
    navigator       = r.getNavigator();
    resultMetaData  = metaData;
    columnCount     = resultMetaData.getColumnCount();

    if (conn != null) {
        if (conn.clientProperties != null) {
            translateTTIType = conn.clientProperties.isPropertyTrue(
                HsqlDatabaseProperties.jdbc_translate_tti_types);
        }
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:JDBCResultSet.java

示例10: adjustUsageCount

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public Result adjustUsageCount(long lobID, int delta) {

        Object[] data  = getLobHeader(sysLobSession, lobID);
        int      count = ((Number) data[2]).intValue();

        if (count + delta == 0) {
            return deleteLob(lobID);
        }

        ResultMetaData meta     = setLobUsage.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = Long.valueOf(count + delta);
        params[1] = Long.valueOf(lobID);

        Result result = sysLobSession.executeCompiledStatement(setLobLength,
            params);

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

示例11: createBlob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public long createBlob(Session session, long length) {

        writeLock.lock();

        try {
            Long           lobID    = getNewLobID();
            ResultMetaData meta     = createLob.getParametersMetaData();
            Object         params[] = new Object[meta.getColumnCount()];

            params[LOB_IDS.LOB_ID]          = lobID;
            params[LOB_IDS.LOB_LENGTH]      = ValuePool.getLong(length);
            params[LOB_IDS.LOB_USAGE_COUNT] = ValuePool.INTEGER_0;
            params[LOB_IDS.LOB_TYPE]        = ValuePool.getInt(Types.SQL_BLOB);

            Result result = sysLobSession.executeCompiledStatement(createLob,
                params, 0);

            usageChanged = true;

            return lobID.longValue();
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:25,代码来源:LobManager.java

示例12: createBlob

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public long createBlob(long length) {

        long           lobID    = getNewLobID(sysLobSession);
        ResultMetaData meta     = createLob.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = Long.valueOf(lobID);
        params[1] = Long.valueOf(length);
        params[2] = Long.valueOf(1);
        params[3] = Integer.valueOf(Types.SQL_BLOB);

        Result result = sysLobSession.executeCompiledStatement(createLob,
            params);

        return lobID;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:LobManager.java

示例13: write

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public void write(RowOutputInterface out, ResultMetaData meta) {

        reset();
        out.writeLong(id);
        out.writeInt(size);
        out.writeInt(0);    // offset
        out.writeInt(size);

        while (hasNext()) {
            Object[] data = getNext();

            out.writeData(meta.getExtendedColumnCount(), meta.columnTypes,
                          data, null, null);
        }

        reset();
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:RowSetNavigatorDataTable.java

示例14: write

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public void write(RowOutputInterface out, ResultMetaData meta) {

        int limit = size - currentOffset;

        if (limit > table.length) {
            limit = table.length;
        }

        out.writeLong(id);
        out.writeInt(size);
        out.writeInt(currentOffset);
        out.writeInt(limit);

        for (int i = 0; i < limit; i++) {
            Object[] data = table[i];

            out.writeData(meta.getColumnCount(), meta.columnTypes, data, null,
                          null);
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:21,代码来源:RowSetNavigatorClient.java

示例15: read

import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public void read(RowInputInterface in,
                 ResultMetaData meta) throws IOException {

    id            = in.readLong();
    size          = in.readInt();
    currentOffset = in.readInt();
    baseBlockSize = in.readInt();

    if (table.length < baseBlockSize) {
        table = new Object[baseBlockSize][];
    }

    for (int i = 0; i < baseBlockSize; i++) {
        table[i] = in.readData(meta.columnTypes);
    }
}
 
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:RowSetNavigatorClient.java


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