当前位置: 首页>>代码示例>>Java>>正文


Java RowSetNavigatorData类代码示例

本文整理汇总了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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:26,代码来源:StatementResultUpdate.java

示例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, "");
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:24,代码来源:StatementExpression.java

示例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");
            }
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:ExpressionTable.java

示例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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:QuerySpecification.java

示例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;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:17,代码来源:QuerySpecification.java

示例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");
            }
        }
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:18,代码来源:ExpressionTable.java

示例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();
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:40,代码来源:TableDerived.java

示例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();
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:32,代码来源:SubQuery.java

示例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;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:9,代码来源:SubQuery.java

示例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();
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:39,代码来源:SubQuery.java

示例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;
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:9,代码来源:SubQuery.java

示例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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:50,代码来源:QueryExpression.java

示例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;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:50,代码来源:QueryExpression.java

示例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;
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:23,代码来源:StatementProcedure.java

示例15: getNavigator

import org.hsqldb.navigator.RowSetNavigatorData; //导入依赖的package包/类
public RowSetNavigatorData getNavigator(Session session) {

        RowSetNavigatorData navigator = new RowSetNavigatorDataTable(session,
            this);

        return navigator;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:8,代码来源:TableDerived.java


注:本文中的org.hsqldb.navigator.RowSetNavigatorData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。