use of org.hsqldb_voltpatches.lib.Iterator in project voltdb by VoltDB.
the class HsqlDatabaseProperties method getUserDefinedPropertyData.
public Set getUserDefinedPropertyData() {
Set set = new HashSet();
Iterator it = meta.values().iterator();
while (it.hasNext()) {
Object[] row = (Object[]) it.next();
if (((Integer) row[indexType]).intValue() == SET_PROPERTY) {
set.add(row);
}
}
return set;
}
use of org.hsqldb_voltpatches.lib.Iterator in project voltdb by VoltDB.
the class PersistentStoreCollectionSession method clearTransactionTables.
public void clearTransactionTables() {
if (rowStoreMapTransaction.isEmpty()) {
return;
}
Iterator it = rowStoreMapTransaction.values().iterator();
while (it.hasNext()) {
PersistentStore store = (PersistentStore) it.next();
store.release();
}
}
use of org.hsqldb_voltpatches.lib.Iterator in project voltdb by VoltDB.
the class PersistentStoreCollectionSession method clearStatementTables.
public void clearStatementTables() {
if (rowStoreMapStatement.isEmpty()) {
return;
}
Iterator it = rowStoreMapStatement.values().iterator();
while (it.hasNext()) {
PersistentStore store = (PersistentStore) it.next();
store.release();
}
}
use of org.hsqldb_voltpatches.lib.Iterator in project voltdb by VoltDB.
the class DatabaseManager method isServerDB.
static boolean isServerDB(Database db) {
Iterator it = serverMap.keySet().iterator();
for (; it.hasNext(); ) {
Server server = (Server) it.next();
HashSet databases = (HashSet) serverMap.get(server);
if (databases.contains(db)) {
return true;
}
}
return false;
}
use of org.hsqldb_voltpatches.lib.Iterator in project voltdb by VoltDB.
the class RangeVariableResolver method expandConditions.
void expandConditions(HsqlArrayList[] array, boolean isJoin) {
for (int i = 0; i < rangeVariables.length; i++) {
HsqlArrayList list = array[i];
map.clear();
set.clear();
boolean hasChain = false;
for (int j = 0; j < list.size(); j++) {
Expression e = (Expression) list.get(j);
if (!e.isColumnEqual || e.getLeftNode().getRangeVariable() == e.getRightNode().getRangeVariable()) {
continue;
}
if (e.getLeftNode().getRangeVariable() == rangeVariables[i]) {
map.put(e.getLeftNode().getColumn(), e.getRightNode());
if (!set.add(e.getLeftNode().getColumn())) {
hasChain = true;
}
} else {
map.put(e.getRightNode().getColumn(), e.getLeftNode());
if (!set.add(e.getRightNode().getColumn())) {
hasChain = true;
}
}
}
if (hasChain && !(hasOuterJoin && isJoin)) {
Iterator keyIt = map.keySet().iterator();
while (keyIt.hasNext()) {
Object key = keyIt.next();
Iterator it = map.get(key);
set.clear();
while (it.hasNext()) {
set.add(it.next());
}
while (set.size() > 1) {
Expression e1 = (Expression) set.remove(set.size() - 1);
for (int j = 0; j < set.size(); j++) {
Expression e2 = (Expression) set.get(j);
closeJoinChain(array, e1, e2);
}
}
}
}
}
}
Aggregations