use of org.hsqldb_voltpatches.result.ResultMetaData in project voltdb by VoltDB.
the class LobManager method deleteLob.
public Result deleteLob(long lobID) {
Session session = this.sysLobSession;
ResultMetaData meta = deleteLob.getParametersMetaData();
Object[] params = new Object[meta.getColumnCount()];
params[0] = Long.valueOf(lobID);
params[1] = Long.valueOf(0);
Result result = session.executeCompiledStatement(deleteLob, params);
return result;
}
use of org.hsqldb_voltpatches.result.ResultMetaData in project voltdb by VoltDB.
the class LobManager method divideBlockAddresses.
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);
}
use of org.hsqldb_voltpatches.result.ResultMetaData in project voltdb by VoltDB.
the class LobManager method truncate.
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);
}
use of org.hsqldb_voltpatches.result.ResultMetaData in project voltdb by VoltDB.
the class LobManager method deleteBlockAddresses.
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);
}
use of org.hsqldb_voltpatches.result.ResultMetaData in project voltdb by VoltDB.
the class LobManager method createBlockAddresses.
void createBlockAddresses(Session session, long lobID, int offset, int count) {
ResultMetaData meta = createLobPart.getParametersMetaData();
Object[] params = new Object[meta.getColumnCount()];
params[ALLOC_BLOCKS.BLOCK_COUNT] = Integer.valueOf(count);
params[ALLOC_BLOCKS.BLOCK_OFFSET] = Integer.valueOf(offset);
params[ALLOC_BLOCKS.LOB_ID] = Long.valueOf(lobID);
Result result = session.executeCompiledStatement(createLobPart, params);
}
Aggregations