本文整理汇总了Java中org.hsqldb.result.ResultMetaData.getColumnCount方法的典型用法代码示例。如果您正苦于以下问题:Java ResultMetaData.getColumnCount方法的具体用法?Java ResultMetaData.getColumnCount怎么用?Java ResultMetaData.getColumnCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.result.ResultMetaData
的用法示例。
在下文中一共展示了ResultMetaData.getColumnCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例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;
}
示例7: getBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
private int[][] getBlockAddresses(long lobID, int offset, int limit) {
ResultMetaData meta = getSpanningBlocks.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[GET_LOB_PART.LOB_ID] = ValuePool.getLong(lobID);
params[GET_LOB_PART.BLOCK_OFFSET] = ValuePool.getInt(offset);
params[GET_LOB_PART.BLOCK_LIMIT] = ValuePool.getInt(limit);
sysLobSession.sessionContext.pushDynamicArguments(params);
Result result = getSpanningBlocks.execute(sysLobSession);
sysLobSession.sessionContext.pop();
RowSetNavigator navigator = result.getNavigator();
int size = navigator.getSize();
int[][] blocks = new int[size][3];
for (int i = 0; i < size; i++) {
navigator.absolute(i);
Object[] data = navigator.getCurrent();
blocks[i][LOBS.BLOCK_ADDR] =
((Integer) data[LOBS.BLOCK_ADDR]).intValue();
blocks[i][LOBS.BLOCK_COUNT] =
((Integer) data[LOBS.BLOCK_COUNT]).intValue();
blocks[i][LOBS.BLOCK_OFFSET] =
((Integer) data[LOBS.BLOCK_OFFSET]).intValue();
}
navigator.release();
return blocks;
}
示例8: getBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
private int[][] getBlockAddresses(long lobID, int offset, int limit) {
ResultMetaData meta = getSpanningBlocks.getParametersMetaData();
Object[] params = new Object[meta.getColumnCount()];
params[GET_LOB_PART.LOB_ID] = ValuePool.getLong(lobID);
params[GET_LOB_PART.BLOCK_OFFSET] = ValuePool.getInt(offset);
params[GET_LOB_PART.BLOCK_LIMIT] = ValuePool.getInt(limit);
sysLobSession.sessionContext.pushDynamicArguments(params);
Result result = getSpanningBlocks.execute(sysLobSession);
sysLobSession.sessionContext.pop();
RowSetNavigator navigator = result.getNavigator();
int size = navigator.getSize();
int[][] blocks = new int[size][3];
for (int i = 0; i < size; i++) {
navigator.absolute(i);
Object[] data = navigator.getCurrent();
blocks[i][LOBS.BLOCK_ADDR] =
((Integer) data[LOBS.BLOCK_ADDR]).intValue();
blocks[i][LOBS.BLOCK_COUNT] =
((Integer) data[LOBS.BLOCK_COUNT]).intValue();
blocks[i][LOBS.BLOCK_OFFSET] =
((Integer) data[LOBS.BLOCK_OFFSET]).intValue();
}
navigator.release();
return blocks;
}
示例9: deleteBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
private void deleteBlockAddresses(long lobID, int offset, int limit) {
ResultMetaData meta = deleteLobPartCall.getParametersMetaData();
Object[] params = new Object[meta.getColumnCount()];
params[DELETE_BLOCKS.LOB_ID] = ValuePool.getLong(lobID);
params[DELETE_BLOCKS.BLOCK_OFFSET] = ValuePool.getInt(offset);
params[DELETE_BLOCKS.BLOCK_LIMIT] = ValuePool.getInt(limit);
params[DELETE_BLOCKS.TX_ID] =
ValuePool.getLong(sysLobSession.getTransactionTimestamp());
Result result =
sysLobSession.executeCompiledStatement(deleteLobPartCall, params,
0);
}
示例10: divideBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
void divideBlockAddresses(Session session, long lobID, int offset) {
ResultMetaData meta = divideLobPart.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[0] = Long.valueOf(lobID);
params[1] = Integer.valueOf(offset);
Result result = session.executeCompiledStatement(divideLobPart,
params);
}
示例11: deleteBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
private void deleteBlockAddresses(long lobID, int offset, int limit) {
ResultMetaData meta = deleteLobPartCall.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[DELETE_BLOCKS.LOB_ID] = ValuePool.getLong(lobID);
params[DELETE_BLOCKS.BLOCK_OFFSET] = ValuePool.getInt(offset);
params[DELETE_BLOCKS.BLOCK_LIMIT] = ValuePool.getInt(limit);
params[DELETE_BLOCKS.TX_ID] =
ValuePool.getLong(sysLobSession.getTransactionTimestamp());
Result result =
sysLobSession.executeCompiledStatement(deleteLobPartCall, params,
0);
}
示例12: deleteBlockAddresses
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
void deleteBlockAddresses(Session session, long lobID, int offset,
int count) {
ResultMetaData meta = deleteLobPart.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[0] = Long.valueOf(lobID);
params[1] = Integer.valueOf(offset);
params[2] = Integer.valueOf(count);
Result result = session.executeCompiledStatement(deleteLobPart,
params);
}
示例13: truncate
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
public Result truncate(Session session, long lobID, long offset) {
Object[] data = getLobHeader(session, lobID);
if (data == null) {
return Result.newErrorResult(Error.error(ErrorCode.X_0F502));
}
/** @todo 1.9.0 - double offset for clob */
long length = ((Long) data[1]).longValue();
int blockOffset = (int) (offset / lobBlockSize);
int blockLimit = (int) ((offset + length) / lobBlockSize);
int byteLimitOffset = (int) ((offset + length) % lobBlockSize);
if (byteLimitOffset != 0) {
blockLimit++;
}
ResultMetaData meta = deleteLobPart.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[0] = Long.valueOf(lobID);
params[1] = Integer.valueOf(blockOffset);
params[2] = Integer.valueOf(blockLimit);
params[3] = Long.valueOf(session.getTransactionTimestamp());
Result result = session.executeCompiledStatement(deleteLobPart,
params);
setLength(session, lobID, offset);
return ResultLob.newLobTruncateResponse(lobID);
}
示例14: truncate
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
public Result truncate(long lobID, long offset) {
if (byteBuffer == null) {
throw Error.error(ErrorCode.DATA_IS_READONLY);
}
writeLock.lock();
try {
Object[] data = getLobHeader(lobID);
if (data == null) {
return Result.newErrorResult(Error.error(ErrorCode.X_0F502));
}
long length = ((Long) data[LOB_IDS.LOB_LENGTH]).longValue();
long byteLength = offset;
if (((Integer) data[LOB_IDS.LOB_TYPE]).intValue()
== Types.SQL_CLOB) {
byteLength *= 2;
}
int blockOffset = (int) ((byteLength + lobBlockSize - 1)
/ lobBlockSize);
ResultMetaData meta = deleteLobPartCall.getParametersMetaData();
Object[] params = new Object[meta.getColumnCount()];
params[DELETE_BLOCKS.LOB_ID] = ValuePool.getLong(lobID);
params[DELETE_BLOCKS.BLOCK_OFFSET] = Integer.valueOf(blockOffset);
params[DELETE_BLOCKS.BLOCK_LIMIT] = ValuePool.INTEGER_MAX;
params[DELETE_BLOCKS.TX_ID] =
ValuePool.getLong(sysLobSession.getTransactionTimestamp());
Result result =
sysLobSession.executeCompiledStatement(deleteLobPartCall,
params, 0);
setLength(lobID, offset);
return ResultLob.newLobTruncateResponse(lobID, offset);
} finally {
writeLock.unlock();
}
}
示例15: setLength
import org.hsqldb.result.ResultMetaData; //导入方法依赖的package包/类
private Result setLength(long lobID, long length) {
ResultMetaData meta = updateLobLength.getParametersMetaData();
Object params[] = new Object[meta.getColumnCount()];
params[UPDATE_LENGTH.LOB_LENGTH] = ValuePool.getLong(length);
params[UPDATE_LENGTH.LOB_ID] = ValuePool.getLong(lobID);
Result result = sysLobSession.executeCompiledStatement(updateLobLength,
params, 0);
return result;
}