Search in sources :

Example 1 with Row

use of org.hsqldb_voltpatches.Row in project voltdb by VoltDB.

the class RowStoreAVLDisk method set.

public void set(CachedObject object) {
    Row row = ((Row) object);
    row.rowAction = (RowAction) rowActionMap.get(row.getPos());
}
Also used : Row(org.hsqldb_voltpatches.Row)

Example 2 with Row

use of org.hsqldb_voltpatches.Row in project voltdb by VoltDB.

the class RowStoreAVLDisk method getNewCachedObject.

public CachedObject getNewCachedObject(Session session, Object object) {
    Row row = new RowAVLDisk(table, (Object[]) object);
    add(row);
    if (session != null) {
        RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);
    }
    return row;
}
Also used : RowAVLDisk(org.hsqldb_voltpatches.RowAVLDisk) Row(org.hsqldb_voltpatches.Row)

Example 3 with Row

use of org.hsqldb_voltpatches.Row in project voltdb by VoltDB.

the class RowSetNavigatorData method exceptAll.

public void exceptAll(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) {
            remove();
        }
    }
    other.close();
}
Also used : Row(org.hsqldb_voltpatches.Row)

Example 4 with Row

use of org.hsqldb_voltpatches.Row in project voltdb by VoltDB.

the class RowSetNavigatorData method add.

public void add(Object data) {
    try {
        Row row = (Row) store.getNewCachedObject(session, data);
        store.indexRow(null, row);
        size++;
    } catch (HsqlException e) {
    }
}
Also used : Row(org.hsqldb_voltpatches.Row) HsqlException(org.hsqldb_voltpatches.HsqlException)

Example 5 with Row

use of org.hsqldb_voltpatches.Row in project voltdb by VoltDB.

the class RowSetNavigatorData method addAdjusted.

private void addAdjusted(Object[] data, int[] columnMap) {
    try {
        if (columnMap == null) {
            data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, table.getColumnCount());
        } else {
            Object[] newData = new Object[table.getColumnCount()];
            ArrayUtil.projectRow(data, columnMap, newData);
            data = newData;
        }
        Row row = (Row) store.getNewCachedObject(session, data);
        store.indexRow(null, row);
        size++;
    } catch (HsqlException e) {
    }
}
Also used : Row(org.hsqldb_voltpatches.Row) HsqlException(org.hsqldb_voltpatches.HsqlException)

Aggregations

Row (org.hsqldb_voltpatches.Row)20 RowAVL (org.hsqldb_voltpatches.RowAVL)5 RowIterator (org.hsqldb_voltpatches.navigator.RowIterator)4 HsqlException (org.hsqldb_voltpatches.HsqlException)3 RowAVLDisk (org.hsqldb_voltpatches.RowAVLDisk)2 SchemaObject (org.hsqldb_voltpatches.SchemaObject)2 NodeAVL (org.hsqldb_voltpatches.index.NodeAVL)2 RowAVLDiskData (org.hsqldb_voltpatches.RowAVLDiskData)1