本文整理汇总了Java中org.hsqldb.navigator.RowSetNavigatorData类的典型用法代码示例。如果您正苦于以下问题:Java RowSetNavigatorData类的具体用法?Java RowSetNavigatorData怎么用?Java RowSetNavigatorData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowSetNavigatorData类属于org.hsqldb.navigator包,在下文中一共展示了RowSetNavigatorData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRow
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
Row getRow(Session session, Object[] args) {
int rowIdIndex = result.metaData.getColumnCount();
Long rowId = (Long) args[rowIdIndex];
PersistentStore store = baseTable.getRowStore(session);
Row row = null;
if (rowIdIndex + 2 == result.metaData.getExtendedColumnCount()) {
Object[] data =
((RowSetNavigatorData) result.getNavigator()).getData(
rowId.longValue());
if (data != null) {
row = (Row) data[rowIdIndex + 1];
}
} else {
int id = (int) rowId.longValue();
row = (Row) store.get(id, false);
}
this.result = null;
return row;
}
示例2: getResult
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
Result getResult(Session session) {
switch (type) {
case StatementTypes.RETURN :
case StatementTypes.CONDITION :
Result result = expression.getResult(session);
// data navigator has statement scope and will be cleared at the end of statement
if (result.isData()) {
RowSetNavigatorData navigator =
new RowSetNavigatorData(session,
result.getNavigator());
result.setNavigator(navigator);
}
return result;
default :
throw Error.runtimeError(ErrorCode.U_S0500, "");
}
}
示例3: getResult
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public Result getResult(Session session) {
switch (opType) {
case OpTypes.TABLE : {
RowSetNavigatorData navigator = table.getNavigator(session);
Result result = Result.newResult(navigator);
result.metaData = table.queryExpression.getMetaData();
return result;
}
default : {
throw Error.runtimeError(ErrorCode.U_S0500, "ExpressionTable");
}
}
}
示例4: getSingleResult
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
private Result getSingleResult(Session session, int maxRows) {
int[] limits = sortAndSlice.getLimits(session, this, maxRows);
Result r = buildResult(session, limits);
RowSetNavigatorData navigator = (RowSetNavigatorData) r.getNavigator();
if (isDistinctSelect) {
navigator.removeDuplicates(session);
}
if (sortAndSlice.hasOrder()) {
navigator.sortOrder(session);
}
if (limits != SortAndSlice.defaultLimits
&& !sortAndSlice.skipFullResult) {
navigator.trim(limits[0], limits[1]);
}
return r;
}
示例5: getSingleResult
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
private Result getSingleResult(Session session, int rowCount) {
int maxRows = getMaxRowCount(session, rowCount);
Result r = buildResult(session, maxRows);
RowSetNavigatorData navigator = (RowSetNavigatorData) r.getNavigator();
if (isDistinctSelect) {
navigator.removeDuplicates();
}
navigator.sortOrder();
navigator.trim(getLimitStart(session),
getLimitCount(session, rowCount));
return r;
}
示例6: getResult
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public Result getResult(Session session) {
switch (opType) {
case OpTypes.TABLE : {
RowSetNavigatorData navigator = subQuery.getNavigator(session);
Result result = Result.newResult(navigator);
result.metaData = subQuery.queryExpression.getMetaData();
return result;
}
default : {
throw Error.runtimeError(ErrorCode.U_S0500, "ExpressionTable");
}
}
}
示例7: materialise
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public void materialise(Session session) {
session.sessionContext.pushStatementState();
try {
PersistentStore store;
// table constructors
if (dataExpression != null) {
store = session.sessionData.getSubqueryRowStore(this);
dataExpression.insertValuesIntoSubqueryTable(session, store);
return;
}
if (queryExpression == null) {
return;
}
Result result;
result = queryExpression.getResult(session, 0);
if (uniqueRows) {
RowSetNavigatorData navigator =
((RowSetNavigatorData) result.getNavigator());
navigator.removeDuplicates(session);
}
store = session.sessionData.getSubqueryRowStore(this);
insertResult(session, store, result);
result.getNavigator().release();
} finally {
session.sessionContext.popStatementState();
}
}
示例8: materialise
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
/**
* Fills the table with a result set
*/
public void materialise(Session session) {
PersistentStore store;
// table constructors
if (isDataExpression) {
store = session.sessionData.getSubqueryRowStore(table);
dataExpression.insertValuesIntoSubqueryTable(session, store);
return;
}
Result result = queryExpression.getResult(session,
isExistsPredicate ? 1
: 0);
RowSetNavigatorData navigator =
((RowSetNavigatorData) result.getNavigator());
if (uniqueRows) {
navigator.removeDuplicates();
}
store = session.sessionData.getSubqueryRowStore(table);
table.insertResult(store, result);
result.getNavigator().close();
}
示例9: hasUniqueNotNullRows
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public boolean hasUniqueNotNullRows(Session session) {
RowSetNavigatorData navigator = new RowSetNavigatorData(session,
table);
boolean result = navigator.hasUniqueNotNullRows();
return result;
}
示例10: materialise
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
/**
* Fills the table with a result set
*/
public void materialise(Session session) {
PersistentStore store;
// table constructors
if (isDataExpression) {
store = session.sessionData.getSubqueryRowStore(table);
dataExpression.insertValuesIntoSubqueryTable(session, store);
return;
}
Result result;
if (isRecursive) {
result = queryExpression.getResultRecursive(session,
recursiveSubQuery.table);
} else {
result = queryExpression.getResult(session, isExistsPredicate ? 1
: 0);
}
if (uniqueRows) {
RowSetNavigatorData navigator =
((RowSetNavigatorData) result.getNavigator());
navigator.removeDuplicates(session);
}
store = session.sessionData.getSubqueryRowStore(table);
table.insertResult(session, store, result);
result.getNavigator().release();
}
示例11: hasUniqueNotNullRows
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public boolean hasUniqueNotNullRows(Session session) {
RowSetNavigatorData navigator = new RowSetNavigatorDataTable(session,
table);
boolean result = navigator.hasUniqueNotNullRows(session);
return result;
}
示例12: getResultRecursive
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
Result getResultRecursive(Session session) {
Result tempResult;
recursiveTable.materialise(session);
RowSetNavigatorData recNav = recursiveTable.getNavigator(session);
Result result = Result.newResult(recNav);
result.metaData = resultMetaData;
for (int round = 0; ; round++) {
tempResult = rightQueryExpression.getResult(session, 0);
RowSetNavigatorData tempNavigator =
(RowSetNavigatorData) tempResult.getNavigator();
if (tempNavigator.isEmpty()) {
break;
}
int startSize = recNav.getSize();
switch (unionType) {
case UNION :
recNav.union(session, tempNavigator);
break;
case UNION_ALL :
recNav.unionAll(session, tempNavigator);
break;
default :
throw Error.runtimeError(ErrorCode.U_S0500,
"QueryExpression");
}
if (startSize == recNav.getSize()) {
break;
}
if (round > 256) {
throw Error.error(ErrorCode.X_22522);
}
}
return result;
}
示例13: getResultRecursive
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
Result getResultRecursive(Session session) {
Result tempResult;
recursiveTable.materialise(session);
RowSetNavigatorData recNav = recursiveTable.getNavigator(session);
Result result = Result.newResult(recNav);
result.metaData = resultMetaData;
for (int round = 0; ; round++) {
tempResult = rightQueryExpression.getResult(session, 0);
RowSetNavigatorData tempNavigator =
(RowSetNavigatorData) tempResult.getNavigator();
if (tempNavigator.isEmpty()) {
break;
}
int startSize = recNav.getSize();
switch (unionType) {
case UNION :
recNav.union(session, tempNavigator);
break;
case UNION_ALL :
recNav.unionAll(session, tempNavigator);
break;
default :
throw Error.runtimeError(ErrorCode.U_S0500,
"QueryExpression");
}
if (startSize == recNav.getSize()) {
break;
}
if (round > 256) {
throw Error.error(ErrorCode.GENERAL_ERROR);
}
}
return result;
}
示例14: executePSMProcedure
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
Result executePSMProcedure(Session session) {
int variableCount = procedure.getVariableCount();
session.sessionContext.routineVariables = new Object[variableCount];
Result result = procedure.statement.execute(session);
if (result.isError()) {
return result;
}
if (procedure.returnsTable()) {
RowSetNavigator resultNavigator = result.getNavigator();
RowSetNavigatorData navigator = new RowSetNavigatorData(session,
resultNavigator);
result.setNavigator(navigator);
}
return result;
}
示例15: getNavigator
import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public RowSetNavigatorData getNavigator(Session session) {
RowSetNavigatorData navigator = new RowSetNavigatorDataTable(session,
this);
return navigator;
}