本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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;
}
示例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;
}
示例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: 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;
}
示例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();
}
}
示例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);
}
}
}
示例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;
}
示例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();
}
}
示例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;
}
示例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();
}
示例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);
}
}
示例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);
}
}