Package org.h2.result

Examples of org.h2.result.Row


                        entry.commit();
                        rows.add(entry.getRow());
                        undoLog.removeLast(false);
                    }
                    for (int i = 0, size = rows.size(); i < size; i++) {
                        Row r = rows.get(i);
                        r.commit();
                    }
                }
            }
            undoLog.clear();
        }
View Full Code Here


    public Cursor find(Session session, SearchRow first, SearchRow last) {
        if (first == null || last == null) {
            // TODO hash index: should additionally check if values are the same
            throw DbException.throwInternalError();
        }
        Row result;
        Long pos = rows.get(first.getValue(indexColumn));
        if (pos == null) {
            result = null;
        } else {
            result = tableData.getRow(session, pos.intValue());
View Full Code Here

     * @return true if there is an uncommitted row
     */
    public boolean isUncommittedFromOtherSession(Session session, Row row) {
        Cursor c = delta.find(session, row, row);
        while (c.next()) {
            Row r = c.get();
            return r.getSessionId() != session.getId();
        }
        return false;
    }
View Full Code Here

    private boolean removeIfExists(Session session, Row row) {
        // maybe it was inserted by the same session just before
        Cursor c = delta.find(session, row, row);
        while (c.next()) {
            Row r = c.get();
            if (r.getKey() == row.getKey() && r.getVersion() == row.getVersion()) {
                if (r != row && table.getScanIndex(session).compareRows(r, row) != 0) {
                    row.setVersion(r.getVersion() + 1);
                } else {
                    delta.remove(session, r);
                    return true;
                }
            }
View Full Code Here

    public Row get() {
        if (values == null) {
            return null;
        }
        if (row == null) {
            row = new Row(values, 1);
        }
        return row;
    }
View Full Code Here

                    return;
                }
                set(x, isLeft, i);
                break;
            }
            Row r = n.row;
            int compare = compareRows(row, r);
            if (compare == 0) {
                if (indexType.isUnique()) {
                    if (!containsNullAndAllowMultipleNull(row)) {
                        throw getDuplicateKeyException();
View Full Code Here

     *
     * @param forUpdateRows the rows to lock
     */
    public void lockRows(ArrayList<Row> forUpdateRows) {
        for (Row row : forUpdateRows) {
            Row newRow = row.getCopy();
            table.removeRow(session, row);
            session.log(table, UndoLogRecord.DELETE, row);
            table.addRow(session, newRow);
            session.log(table, UndoLogRecord.INSERT, newRow);
        }
View Full Code Here

            beforeFirst = false;
            current = min;
        } else {
            current++;
        }
        currentRow = new Row(new Value[]{ValueLong.get(current)}, 1);
        return current <= max;
    }
View Full Code Here

            int page = index.getPageStore().allocatePage();
            firstOverflowPageId = page;
            this.overflowRowSize = pageSize + rowLength;
            writeData();
            // free up the space used by the row
            Row r = rows[0];
            rowRef = new SoftReference<Row>(r);
            rows[0] = null;
            Data all = index.getPageStore().createData();
            all.checkCapacity(data.length());
            all.write(data.getBytes(), 0, data.length());
View Full Code Here

        written = false;
        changeCount = index.getPageStore().getChangeCount();
        if (!optimizeUpdate) {
            readAllRows();
        }
        Row r = getRowAt(i);
        if (r != null) {
            memoryChange(false, r);
        }
        entryCount--;
        if (entryCount < 0) {
View Full Code Here

TOP

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