Search in sources :

Example 21 with HashMappedList

use of org.hsqldb_voltpatches.lib.HashMappedList in project voltdb by VoltDB.

the class SessionContext method push.

public void push() {
    if (stack == null) {
        stack = new HsqlArrayList(true);
    }
    stack.add(dynamicArguments);
    stack.add(routineArguments);
    stack.add(routineVariables);
    stack.add(rangeIterators);
    stack.add(savepoints);
    stack.add(savepointTimestamps);
    rangeIterators = new RangeIterator[4];
    savepoints = new HashMappedList(4);
    savepointTimestamps = new LongDeque();
    String name = HsqlNameManager.getAutoSavepointNameString(session.actionTimestamp, depth);
    session.savepoint(name);
    depth++;
}
Also used : HashMappedList(org.hsqldb_voltpatches.lib.HashMappedList) HsqlArrayList(org.hsqldb_voltpatches.lib.HsqlArrayList) LongDeque(org.hsqldb_voltpatches.lib.LongDeque)

Example 22 with HashMappedList

use of org.hsqldb_voltpatches.lib.HashMappedList in project voltdb by VoltDB.

the class SessionContext method clearStructures.

void clearStructures(StatementDMQL cs) {
    if (cs.type == StatementTypes.UPDATE_WHERE || cs.type == StatementTypes.DELETE_WHERE || cs.type == StatementTypes.MERGE) {
        if (constraintPath != null) {
            constraintPath.clear();
        }
        if (tableUpdateList != null) {
            for (int i = 0; i < tableUpdateList.size(); i++) {
                HashMappedList updateList = (HashMappedList) tableUpdateList.get(i);
                updateList.clear();
            }
        }
    }
    if (cs.type == StatementTypes.INSERT) {
    //
    }
    int count = cs.rangeIteratorCount;
    if (count > rangeIterators.length) {
        count = rangeIterators.length;
    }
    for (int i = 0; i < count; i++) {
        if (rangeIterators[i] != null) {
            rangeIterators[i].reset();
            rangeIterators[i] = null;
        }
    }
}
Also used : HashMappedList(org.hsqldb_voltpatches.lib.HashMappedList)

Example 23 with HashMappedList

use of org.hsqldb_voltpatches.lib.HashMappedList in project voltdb by VoltDB.

the class SchemaManager method getAllTables.

/**
     *  Returns an HsqlArrayList containing references to all non-system
     *  tables and views. This includes all tables and views registered with
     *  this Database.
     */
public HsqlArrayList getAllTables() {
    Iterator schemas = allSchemaNameIterator();
    HsqlArrayList alltables = new HsqlArrayList();
    while (schemas.hasNext()) {
        String name = (String) schemas.next();
        HashMappedList current = getTables(name);
        alltables.addAll(current.values());
    }
    return alltables;
}
Also used : HashMappedList(org.hsqldb_voltpatches.lib.HashMappedList) HsqlArrayList(org.hsqldb_voltpatches.lib.HsqlArrayList) Iterator(org.hsqldb_voltpatches.lib.Iterator) WrapperIterator(org.hsqldb_voltpatches.lib.WrapperIterator)

Aggregations

HashMappedList (org.hsqldb_voltpatches.lib.HashMappedList)23 HsqlName (org.hsqldb_voltpatches.HsqlNameManager.HsqlName)4 OrderedHashSet (org.hsqldb_voltpatches.lib.OrderedHashSet)4 HashSet (org.hsqldb_voltpatches.lib.HashSet)3 HsqlArrayList (org.hsqldb_voltpatches.lib.HsqlArrayList)3 Index (org.hsqldb_voltpatches.index.Index)2 Iterator (org.hsqldb_voltpatches.lib.Iterator)2 RowIterator (org.hsqldb_voltpatches.navigator.RowIterator)2 RowSetNavigator (org.hsqldb_voltpatches.navigator.RowSetNavigator)2 PersistentStore (org.hsqldb_voltpatches.persist.PersistentStore)2 Result (org.hsqldb_voltpatches.result.Result)2 EOFException (java.io.EOFException)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 LineNumberReader (java.io.LineNumberReader)1 HashSet (java.util.HashSet)1 HsqlException (org.hsqldb_voltpatches.HsqlException)1 SimpleName (org.hsqldb_voltpatches.HsqlNameManager.SimpleName)1 RangeIteratorBase (org.hsqldb_voltpatches.RangeVariable.RangeIteratorBase)1