Package org.hsqldb_voltpatches

Examples of org.hsqldb_voltpatches.Row


    public CachedObject getNewCachedObject(Session session,
                                           Object object)
                                           {

        Row row = new RowAVL(table, (Object[]) object);

        if (session != null) {
            RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);
        }

        int id = rowIdSequence++;

        row.setPos(id);
        rowIdMap.put(id, row);

        return row;
    }
View Full Code Here


        RowIterator it       = primaryIndex.firstRow(this);
        int         position = oldIndex.getPosition() - 1;

        while (it.hasNext()) {
            Row     row      = it.getNextRow();
            int     i        = position - 1;
            NodeAVL backnode = ((RowAVL) row).getNode(0);

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

        int           rowCount = 0;
        HsqlException error    = null;

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

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

                // count before inserting
                rowCount++;

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

            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

        setAccessor(index, null);

        RowIterator it = table.rowIterator(session);

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

            // may need to clear the node before insert
            index.insert(session, this, row);
        }
    }
View Full Code Here

        }
    }

    public CachedObject getNewCachedObject(Session session, Object object) {

        Row row = new RowAVLDiskData(table, (Object[]) object);

        add(row);
        RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);

        return row;
View Full Code Here

    }

    public CachedObject getNewCachedObject(Session session, Object object) {

        if (isCached) {
            Row row = new RowAVLDisk(table, (Object[]) object);

            add(row);

            if (isTempTable) {
                RowAction.addAction(session, RowAction.ACTION_INSERT,
                                    (Table) table, row);
            }

            return row;
        } else {
            memoryRowCount++;

            if (useCache && memoryRowCount > maxMemoryRowCount) {
                changeToDiskTable();

                return getNewCachedObject(session, object);
            }

            Row row = new RowAVL(table, (Object[]) object);
            int id  = rowIdSequence++;

            row.setPos(id);
            rowIdMap.put(id, row);

            if (isTempTable) {
                RowAction.addAction(session, RowAction.ACTION_INSERT,
                                    (Table) table, row);
View Full Code Here

            isCached = true;

            cache.storeCount++;

            while (iterator.hasNext()) {
                Row row    = iterator.getNextRow();
                Row newRow = (Row) getNewCachedObject(session, row.getData());

                indexRow(null, newRow);
            }

            rowIdMap.clear();
View Full Code Here

    }

    public void add(Object data) {

        try {
            Row row = (Row) store.getNewCachedObject(session, data);

            store.indexRow(null, row);

            size++;
        } catch (HsqlException e) {}
View Full Code Here

                ArrayUtil.projectRow(data, columnMap, newData);

                data = newData;
            }

            Row row = (Row) store.getNewCachedObject(session, data);

            store.indexRow(null, row);

            size++;
        } catch (HsqlException e) {}
View Full Code Here

    public void intersectAll(RowSetNavigatorData other) {

        Object[]    compareData = null;
        RowIterator it;
        Row         otherRow  = null;
        Object[]    otherData = null;

        sortFull();
        reset();
        other.sortFull();

        it = other.fullIndex.emptyIterator();

        while (hasNext()) {
            getNext();

            Object[] currentData = currentRow.getData();
            boolean newGroup =
                compareData == null
                || fullIndex.compareRowNonUnique(
                    currentData, compareData, fullIndex.getColumnCount()) != 0;

            if (newGroup) {
                compareData = currentData;
                it = other.fullIndex.findFirstRow(session, other.store,
                                                  currentData);
            }

            otherRow  = it.getNextRow();
            otherData = otherRow == null ? null
                                         : otherRow.getData();

            if (otherData != null
                    && fullIndex.compareRowNonUnique(
                        currentData, otherData,
                        fullIndex.getColumnCount()) == 0) {
View Full Code Here

TOP

Related Classes of org.hsqldb_voltpatches.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.