本文整理汇总了Java中org.hsqldb.result.ResultMetaData类的典型用法代码示例。如果您正苦于以下问题:Java ResultMetaData类的具体用法?Java ResultMetaData怎么用?Java ResultMetaData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResultMetaData类属于org.hsqldb.result包,在下文中一共展示了ResultMetaData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: getResultMetaData
import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
@Override
public ResultMetaData getResultMetaData() {
switch (type) {
case StatementTypes.SELECT_CURSOR :
return queryExpression.getMetaData();
case StatementTypes.SELECT_SINGLE :
return queryExpression.getMetaData();
default :
throw Error.runtimeError(
ErrorCode.U_S0500,
"CompiledStatement.getResultMetaData()");
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:StatementQuery.java
示例17: write
import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
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:Julien35,项目名称:dev-courses,代码行数:19,代码来源:RowSetNavigatorData.java
示例18: write
import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
reset();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = (Object[]) getNext();
out.writeData(meta.getExtendedColumnCount(), meta.columnTypes,
data, null, null);
}
reset();
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:RowSetNavigatorData.java
示例19: getResultMetaData
import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
/**
* Returns the metadata, which is empty if the CompiledStatement does not
* generate a Result.
*/
public ResultMetaData getResultMetaData() {
switch (type) {
case StatementTypes.DELETE_WHERE :
case StatementTypes.INSERT :
case StatementTypes.UPDATE_WHERE :
return ResultMetaData.emptyResultMetaData;
default :
throw Error.runtimeError(
ErrorCode.U_S0500,
"CompiledStatement.getResultMetaData()");
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:20,代码来源:StatementDMQL.java
示例20: getResultMetaData
import org.hsqldb.result.ResultMetaData; //导入依赖的package包/类
public ResultMetaData getResultMetaData() {
switch (type) {
case StatementTypes.EXPLAIN_PLAN :
return ResultMetaData.newSingleColumnMetaData("OPERATION");
case StatementTypes.DATABASE_SCRIPT :
if (statementReturnType == StatementTypes.RETURN_RESULT) {
return ResultMetaData.newSingleColumnMetaData("COMMANDS");
}
// fall through
default :
return super.getResultMetaData();
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:18,代码来源:StatementCommand.java
注:本文中的org.hsqldb.result.ResultMetaData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论