本文整理汇总了Java中org.hsqldb.navigator.RowSetNavigator类的典型用法代码示例。如果您正苦于以下问题:Java RowSetNavigator类的具体用法?Java RowSetNavigator怎么用?Java RowSetNavigator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowSetNavigator类属于org.hsqldb.navigator包,在下文中一共展示了RowSetNavigator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initialiseLobSpace
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
private void initialiseLobSpace() {
Statement statement = sysLobSession.compileStatement(existsBlocksSQL);
Result result = statement.execute(sysLobSession);
if (result.isError()) {
throw result.getException();
}
RowSetNavigator navigator = result.getNavigator();
int size = navigator.getSize();
if (size > 0) {
return;
}
statement = sysLobSession.compileStatement(initialiseBlocksSQL);
Object[] params = new Object[3];
params[0] = ValuePool.INTEGER_0;
params[1] = ValuePool.getInt(totalBlockLimitCount);
params[2] = ValuePool.getLong(0);
sysLobSession.executeCompiledStatement(statement, params, 0);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:27,代码来源:LobManager.java
示例2: registerLobForResult
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
public void registerLobForResult(Result result) {
RowSetNavigator navigator = result.getNavigator();
if (navigator == null) {
registerLobsForRow((Object[]) result.valueData);
} else {
while (navigator.next()) {
Object[] data = navigator.getCurrent();
registerLobsForRow(data);
}
navigator.reset();
}
resultLobs.clear();
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:SessionData.java
示例3: getCurrent
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Fetches the current row of the result set.
*
* @throws SQLException when result set is closed; result set is empty;
* result set is before first; result set is alfter last; no row data is
* available.
* @return Object[]
*/
protected Object[] getCurrent() throws SQLException {
final RowSetNavigator lnavigator = this.navigator;
if (lnavigator == null) {
throw JDBCUtil.sqlException(ErrorCode.X_24501);
} else if (lnavigator.isEmpty()) {
throw JDBCUtil.sqlException(ErrorCode.X_24504, ErrorCode.M_RS_EMPTY);
} else if (lnavigator.isBeforeFirst()) {
throw JDBCUtil.sqlException(ErrorCode.X_24504,
ErrorCode.M_RS_BEFORE_FIRST);
} else if (lnavigator.isAfterLast()) {
throw JDBCUtil.sqlException(ErrorCode.X_24504,
ErrorCode.M_RS_AFTER_LAST);
}
Object[] data = lnavigator.getCurrent();
if (data == null) {
throw JDBCUtil.sqlException(ErrorCode.X_24501);
}
return data;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:33,代码来源:JDBCResultSet.java
示例4: fireTriggers
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
void fireTriggers(Session session, int trigVecIndex,
RowSetNavigator rowSet) {
if (!database.isReferentialIntegrity()) {
return;
}
TriggerDef[] trigVec = triggerLists[trigVecIndex];
for (int i = 0, size = trigVec.length; i < size; i++) {
TriggerDef td = trigVec[i];
boolean sqlTrigger = td instanceof TriggerDefSQL;
if (td.hasOldTable()) {
//
}
td.pushPair(session, null, null);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:Table.java
示例5: getInsertValuesNavigator
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
RowSetNavigator getInsertValuesNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
//
Expression[] list = insertExpression.nodes;
RowSetNavigatorClient newData = new RowSetNavigatorClient(list.length);
for (int j = 0; j < list.length; j++) {
Expression[] rowArgs = list[j].nodes;
Object[] data = getInsertData(session, colTypes, rowArgs);
newData.add(data);
}
return newData;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:StatementInsert.java
示例6: initialiseNavigator
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
public RowSetNavigator initialiseNavigator() {
switch (mode) {
case ResultConstants.BATCHEXECUTE :
case ResultConstants.BATCHEXECDIRECT :
case ResultConstants.BATCHEXECRESPONSE :
case ResultConstants.SETSESSIONATTR :
case ResultConstants.PARAM_METADATA :
navigator.beforeFirst();
return navigator;
case ResultConstants.DATA :
case ResultConstants.DATAHEAD :
case ResultConstants.GENERATED :
navigator.reset();
return navigator;
default :
throw Error.runtimeError(ErrorCode.U_S0500, "Result");
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:25,代码来源:Result.java
示例7: getCurrent
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Fetches the current row of the result set.
*
* @throws SQLException when result set is closed; result set is empty;
* result set is before first; result set is alfter last; no row data is
* available.
* @return Object[]
*/
private Object[] getCurrent() throws SQLException {
final RowSetNavigator lnavigator = this.navigator;
if (lnavigator == null) {
throw Util.sqlException(ErrorCode.X_24501);
} else if (lnavigator.isEmpty()) {
throw Util.sqlException(ErrorCode.X_24504, ErrorCode.M_RS_EMPTY);
} else if (lnavigator.isBeforeFirst()) {
throw Util.sqlException(ErrorCode.X_24504,
ErrorCode.M_RS_BEFORE_FIRST);
} else if (lnavigator.isAfterLast()) {
throw Util.sqlException(ErrorCode.X_24504,
ErrorCode.M_RS_AFTER_LAST);
}
Object[] data = lnavigator.getCurrent();
if (data == null) {
throw Util.sqlException(ErrorCode.X_24501);
}
return data;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:33,代码来源:JDBCResultSet.java
示例8: readDDL
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
protected void readDDL(Session session) throws IOException {
Result r = Result.newResult(dataStreamIn, rowIn);
r.readAdditionalResults(session, dataStreamIn, rowIn);
RowSetNavigator nav = r.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
String s = (String) data[0];
Result result = session.executeDirectStatement(s);
if (result.isError()) {
db.logger.appLog.logContext(SimpleLog.LOG_ERROR,
result.getMainString());
throw Error.error(result);
}
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:ScriptReaderBinary.java
示例9: initialiseNavigator
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
public RowSetNavigator initialiseNavigator() {
switch (mode) {
case ResultConstants.BATCHEXECUTE :
case ResultConstants.BATCHEXECDIRECT :
case ResultConstants.BATCHEXECRESPONSE :
case ResultConstants.EXECUTE :
case ResultConstants.UPDATE_RESULT :
case ResultConstants.SETSESSIONATTR :
case ResultConstants.PARAM_METADATA :
navigator.beforeFirst();
return navigator;
case ResultConstants.DATA :
case ResultConstants.DATAHEAD :
navigator.reset();
return navigator;
default :
throw Error.runtimeError(ErrorCode.U_S0500, "Result");
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:26,代码来源:Result.java
示例10: getBlockAddresses
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的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;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:37,代码来源:LobManager.java
示例11: getDataResultSlice
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
Result getDataResultSlice(long id, int offset, int count) {
Result result = (Result) resultMap.get(id);
RowSetNavigator source = result.getNavigator();
if (offset + count > source.getSize()) {
count = source.getSize() - offset;
}
return Result.newDataRowsResult(result, offset, count);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:12,代码来源:SessionData.java
示例12: getRowSetSlice
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
RowSetNavigatorClient getRowSetSlice(long id, int offset, int count) {
Result result = (Result) resultMap.get(id);
RowSetNavigator source = result.getNavigator();
if (offset + count > source.getSize()) {
count = source.getSize() - offset;
}
return new RowSetNavigatorClient(source, offset, count);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:12,代码来源:SessionData.java
示例13: insertSingleRow
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
Result insertSingleRow(Session session, PersistentStore store,
Object[] data) {
session.sessionData.startRowProcessing();
baseTable.setIdentityColumn(session, data);
if (baseTable.triggerLists[Trigger.INSERT_BEFORE_ROW].length > 0) {
baseTable.fireTriggers(session, Trigger.INSERT_BEFORE_ROW, null,
data, null);
}
baseTable.insertSingleRow(session, store, data, null);
performIntegrityChecks(session, baseTable, null, data, null);
if (session.database.isReferentialIntegrity()) {
for (int i = 0, size = baseTable.fkConstraints.length; i < size;
i++) {
baseTable.fkConstraints[i].checkInsert(session, baseTable,
data, true);
}
}
if (baseTable.triggerLists[Trigger.INSERT_AFTER_ROW].length > 0) {
baseTable.fireTriggers(session, Trigger.INSERT_AFTER_ROW, null,
data, null);
}
if (baseTable.triggerLists[Trigger.INSERT_AFTER].length > 0) {
baseTable.fireTriggers(session, Trigger.INSERT_AFTER,
(RowSetNavigator) null);
}
session.sessionContext
.diagnosticsVariables[ExpressionColumn.idx_row_count] =
Integer.valueOf(1);
return Result.updateOneResult;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:39,代码来源:StatementDML.java
示例14: insertTableValues
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
private void insertTableValues(Session session, PersistentStore store) {
Result result = nodes[LEFT].getResult(session);
RowSetNavigator nav = result.navigator;
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newdata = (Object[]) ArrayUtil.duplicateArray(data);
Row row = (Row) store.getNewCachedObject(session, newdata, false);
try {
store.indexRow(session, row);
} catch (HsqlException e) {}
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:16,代码来源:ExpressionTable.java
示例15: insertIntoTable
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Multi-row insert method. Used for CREATE TABLE AS ... queries.
*/
void insertIntoTable(Session session, Result result) {
PersistentStore store = getRowStore(session);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:Table.java
示例16: insertSys
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Used for system table inserts. No checks. No identity
* columns.
*/
public int insertSys(Session session, PersistentStore store, Result ins) {
RowSetNavigator nav = ins.getNavigator();
int count = 0;
while (nav.hasNext()) {
insertSys(session, store, nav.getNext());
count++;
}
return count;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:Table.java
示例17: insertResult
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Used for subquery inserts. No checks. No identity
* columns.
*/
void insertResult(Session session, PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:Table.java
示例18: getInsertSelectNavigator
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {
Type[] colTypes = baseTable.getColumnTypes();
int[] columnMap = insertColumnMap;
//
Result result = queryExpression.getResult(session, 0);
RowSetNavigator nav = result.initialiseNavigator();
Type[] sourceTypes = result.metaData.columnTypes;
RowSetNavigatorClient newData =
new RowSetNavigatorClient(nav.getSize());
while (nav.hasNext()) {
Object[] data = baseTable.getNewRowData(session);
Object[] sourceData = nav.getNext();
for (int i = 0; i < columnMap.length; i++) {
int j = columnMap[i];
if (j == this.overrideUserValue) {
continue;
}
Type sourceType = sourceTypes[i];
data[j] = colTypes[j].convertToType(session, sourceData[i],
sourceType);
}
newData.add(data);
}
return newData;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:35,代码来源:StatementInsert.java
示例19: deleteRows
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
void deleteRows(Session session, Table table, RowSetNavigator oldRows) {
while (oldRows.hasNext()) {
oldRows.next();
Row row = oldRows.getCurrentRow();
if (!row.isDeleted(session)) {
table.deleteNoRefCheck(session, row);
}
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:13,代码来源:StatementDML.java
示例20: insertIntoTable
import org.hsqldb.navigator.RowSetNavigator; //导入依赖的package包/类
/**
* Multi-row insert method. Used for CREATE TABLE AS ... queries.
*/
void insertIntoTable(Session session, Result result) {
PersistentStore store = session.sessionData.getRowStore(this);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, getColumnCount());
insertData(store, newData);
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:16,代码来源:Table.java
注:本文中的org.hsqldb.navigator.RowSetNavigator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论