Package org.hsqldb.persist

Examples of org.hsqldb.persist.PersistentStore


        return new Result(ResultConstants.UPDATECOUNT, count);
    }

    Result executeDeleteTruncateStatement(Session session) {

        PersistentStore store = targetTable.getRowStore(session);
        RowIterator     it    = targetTable.getPrimaryIndex().firstRow(store);

        try {
            while (it.hasNext()) {
                Row row = it.getNextRow();
View Full Code Here


            for (int i = 0; i < navigator.getSize(); i++) {
                Row             row          = navigator.getNextRow();
                Object[]        data = navigator.getCurrentChangedData();
                Table           currentTable = ((Table) row.getTable());
                int[] changedColumns = navigator.getCurrentChangedColumns();
                PersistentStore store = currentTable.getRowStore(session);

                if (data == null) {
                    continue;
                }
View Full Code Here

     *  Return the list of file pointers to root nodes for this table's
     *  indexes.
     */
    public final int[] getIndexRootsArray() {

        PersistentStore store =
            database.persistentStoreCollection.getStore(this);
        int[] roots = new int[indexList.length * 2 + 1];
        int   i     = 0;

        for (int index = 0; index < indexList.length; index++) {
            CachedObject accessor = store.getAccessor(indexList[index]);

            roots[i++] = accessor == null ? -1
                                          : accessor.getPos();
        }

View Full Code Here

        if (!isCached) {
            throw Error.error(ErrorCode.X_42501, tableName.name);
        }

        PersistentStore store =
            database.persistentStoreCollection.getStore(this);
        int i = 0;

        for (int index = 0; index < indexList.length; index++) {
            store.setAccessor(indexList[index], roots[i++]);
        }

        int size = roots[indexList.length * 2];

        for (int index = 0; index < indexList.length; index++) {
            store.setElementCount(indexList[index], size, roots[i++]);
        }
    }
View Full Code Here

    /**
     * Multi-row insert method. Used for CREATE TABLE AS ... queries.
     */
    void insertIntoTable(Session session, Result result) {

        PersistentStore store = session.sessionData.getRowStore(this);
        RowSetNavigator nav   = result.initialiseNavigator();

        while (nav.hasNext()) {
            Object[] data = (Object[]) nav.getNext();
            Object[] newData =
View Full Code Here

     */
    public void insertNoCheckFromLog(Session session, Object[] data) {

        systemUpdateIdentityValue(data);

        PersistentStore store = session.sessionData.getRowStore(this);
        Row             row   = (Row) store.getNewCachedObject(session, data);

        store.indexRow(session, row);
        session.addInsertAction(this, row);
    }
View Full Code Here

     * For log statements. Delete a single row.
     */
    public void deleteNoCheckFromLog(Session session, Object[] data) {

        Row             row   = null;
        PersistentStore store = session.sessionData.getRowStore(this);

        if (hasPrimaryKey()) {
            RowIterator it = getPrimaryIndex().findFirstRow(session, store,
                data, primaryKeyColsSequence);

View Full Code Here

            action = RowAction.addDeleteAction(session, table, row, colMap);
        }

        session.rowActionList.add(action);

        PersistentStore store = session.sessionData.getRowStore(table);

        store.delete(session, row);

        return action;
    }
View Full Code Here

        checkAccessRights(session);

        Object[]        args = session.sessionContext.dynamicArguments;
        Row             row;
        PersistentStore store = baseTable.getRowStore(session);

        switch (actionType) {

            case ResultConstants.UPDATE_CURSOR : {
                row = getRow(session, args);
View Full Code Here

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

TOP

Related Classes of org.hsqldb.persist.PersistentStore

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.