Package org.hsqldb

Examples of org.hsqldb.Row


        int           rowCount = 0;
        HsqlException error    = null;

        try {
            while (it.hasNext()) {
                Row row = it.getNextRow();

                ((RowAVL) row).insertNode(position);

                // count before inserting
                rowCount++;

                newIndex.insert(session, this, row);
            }

            it.release();

            return true;
        } catch (java.lang.OutOfMemoryError e) {
            error = Error.error(ErrorCode.OUT_OF_MEMORY);
        } catch (HsqlException e) {
            error = e;
        }

        // backtrack on error
        // rowCount rows have been modified
        it = primaryIndex.firstRow(this);

        for (int i = 0; i < rowCount; i++) {
            Row     row      = it.getNextRow();
            NodeAVL backnode = ((RowAVL) row).getNode(0);
            int     j        = position;

            while (--j > 0) {
                backnode = backnode.nNext;
View Full Code Here


    protected void clear() {

        Iterator it = cache.getIterator();

        while (it.hasNext()) {
            Row row = (Row) it.next();

            row.setInMemory(false);
            row.destroy();
        }

        cache.clear();

        fileStartFreePosition = fileFreePosition = initialFreePos;
View Full Code Here

        long pos = tableSpace.getFilePosition(size, false);

        object.setPos(pos);

        if (tx) {
            Row row = (Row) object;
            RowAction action = new RowAction(session, table,
                                             RowAction.ACTION_INSERT, row,
                                             null);

            row.rowAction = action;
View Full Code Here

    }

    public CachedObject getNewCachedObject(Session session, Object object,
                                           boolean tx) {

        Row row;

        if (largeData) {
            row = new RowAVLDiskLarge(table, (Object[]) object, this);
        } else {
            row = new RowAVLDisk(table, (Object[]) object, this);
View Full Code Here

            RowIterator it = rowIterator();

            // todo - check this - must remove from old space, not new one
            while (it.hasNext()) {
                Row row = it.getNextRow();

                cache.remove(row);
                tableSpace.release(row.getPos(), row.getStorageSize());
            }

            accessorList = newAccessorList;
        } finally {
            cache.writeLock.unlock();
View Full Code Here

                        RowIterator it =
                            t.rowIteratorClustered(currentSession);

                        while (it.hasNext()) {
                            Row row = it.getNextRow();

                            writeRow(currentSession, row, t);
                        }

                        writeTableTerm(t);
View Full Code Here

                return;
            }

            while (true) {
                Row currentRow = n.row;

                compare = 0;

                if (compareSimple) {
                    compare =
                        colTypes[0].compare(session, rowData[colIndex[0]],
                                            currentRow.getData()[colIndex[0]]);

                    if (compare == 0 && compareRowId) {
                        compare = compareRowForInsertOrDelete(session, row,
                                                              currentRow,
                                                              compareRowId, 1);
View Full Code Here

                return;
            }

            while (true) {
                Row currentRow = n.row;

                compare = 0;

                if (compareSimple) {
                    compare =
                        colTypes[0].compare(session, rowData[colIndex[0]],
                                            currentRow.getData()[colIndex[0]]);

                    if (compare == 0 && compareRowId) {
                        compare = compareRowForInsertOrDelete(session, row,
                                                              currentRow,
                                                              compareRowId, 1);
View Full Code Here

                return;
            }

            while (true) {
                Row currentRow = n.getRow(store);

                compare = compareRowForInsertOrDelete(session, row,
                                                      currentRow,
                                                      compareRowId, 0);
View Full Code Here

                x = l;
                l = x.getLeft(store);
            }

            while (session != null && x != null) {
                Row row = x.getRow(store);

                if (session.database.txManager.canRead(
                        session, row, TransactionManager.ACTION_READ, null)) {
                    break;
                }
View Full Code Here

TOP

Related Classes of org.hsqldb.Row

Copyright © 2018 www.massapicom. 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.