Examples of RowSetNavigator


Examples of org.hsqldb.navigator.RowSetNavigator

    protected void writeTableTerm(Table t) throws IOException {}

    protected void writeSingleColumnResult(Result r) throws IOException {

        RowSetNavigator nav = r.initialiseNavigator();

        while (nav.hasNext()) {
            Object[] data = (Object[]) nav.getNext();

            writeLogStatement(currentSession, (String) data[0]);
        }
    }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

     *   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);
        }

View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        if (result.isError()) {
            throw result.getException();
        }

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();

        if (size > 0) {
            return;
        }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        if (result.isError()) {
            return Long.valueOf(0);
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();

        if (!next) {
            navigator.release();

            return Long.valueOf(0);
        }

        Object[] data = navigator.getCurrent();

        navigator.release();

        return (Long) data[0];
    }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        if (result.isError()) {
            throw result.getException();
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();
        Object[]        data      = null;

        if (next) {
            data = navigator.getCurrent();
        }

        navigator.release();

        return data;
    }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

                return result;
            }

            usageChanged = false;

            RowSetNavigator navigator = result.getNavigator();
            boolean         next      = navigator.next();

            if (!next) {
                navigator.release();

                return Result.updateOneResult;
            }

            Object[] data = navigator.getCurrent();

            if (data[LOBS.BLOCK_ADDR] == null
                    || data[LOBS.BLOCK_COUNT] == null) {
                return Result.updateOneResult;
            }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        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;
    }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

            Result result = getLobCount.execute(sysLobSession);

            sysLobSession.sessionContext.pop();

            RowSetNavigator navigator = result.getNavigator();
            boolean         next      = navigator.next();

            if (!next) {
                navigator.release();

                return 0;
            }

            Object[] data = navigator.getCurrent();

            return ((Number) data[0]).intValue();
        } finally {
            writeLock.unlock();
        }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        Result result = getSpanningParts.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        long[][]        blocks    = new long[size][6];

        for (int i = 0; i < size; i++) {
            navigator.absolute(i);

            Object[] data = navigator.getCurrent();

            for (int j = 0; j < blocks[i].length; j++) {
                blocks[i][j] = ((Number) data[j]).longValue();
            }
        }

        navigator.release();

        return blocks;
    }
View Full Code Here

Examples of org.hsqldb.navigator.RowSetNavigator

        Result result = getLastPart.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        long[]          blocks    = new long[6];

        if (size == 0) {
            blocks[ALLOC_PART.LOB_ID] = lobID;
        } else {
            navigator.absolute(0);

            Object[] data = navigator.getCurrent();

            for (int j = 0; j < blocks.length; j++) {
                blocks[j] = ((Number) data[j]).longValue();
            }
        }

        navigator.release();

        return blocks;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.