@Override public boolean next() { if (current == null) { return false; } if (i >= current.getEntryCount()) { current.nextPage(this); if (current == null) { return false; } } currentSearchRow = current.getRow(i); currentRow = null; if (last != null && index.compareRows(currentSearchRow, last) > 0) { currentSearchRow = null; return false; } i++; return true; }
int i = (l + r) >>> 1; SearchRow row = getRow(i); comp = index.compareRows(row, compare); if (comp == 0) { if (add && index.indexType.isUnique()) {
@Override SearchRow remove(SearchRow row) { int at = find(row, false, false, true); SearchRow delete = getRow(at); if (index.compareRows(row, delete) != 0 || delete.getKey() != row.getKey()) { throw DbException.get(ErrorCode.ROW_NOT_FOUND_WHEN_DELETING_1, index.getSQL() + ": " + row); } index.getPageStore().logUndo(this, data); if (entryCount == 1) { // the page is now empty return row; } removeRow(at); memoryChange(); index.getPageStore().update(this); if (at == entryCount) { // the last row changed return getRow(at - 1); } // the last row didn't change return null; }
@Override public boolean next() { if (current == null) { return false; } if (i >= current.getEntryCount()) { current.nextPage(this); if (current == null) { return false; } } currentSearchRow = current.getRow(i); currentRow = null; if (last != null && index.compareRows(currentSearchRow, last) > 0) { currentSearchRow = null; return false; } i++; return true; }
@Override public boolean next() { if (current == null) { return false; } if (i >= current.getEntryCount()) { current.nextPage(this); if (current == null) { return false; } } currentSearchRow = current.getRow(i); currentRow = null; if (last != null && index.compareRows(currentSearchRow, last) > 0) { currentSearchRow = null; return false; } i++; return true; }
int i = (l + r) >>> 1; SearchRow row = getRow(i); comp = index.compareRows(row, compare); if (comp == 0) { if (add && index.indexType.isUnique()) {
int i = (l + r) >>> 1; SearchRow row = getRow(i); comp = index.compareRows(row, compare); if (comp == 0) { if (add && index.indexType.isUnique()) {
@Override SearchRow remove(SearchRow row) { int at = find(row, false, false, true); SearchRow delete = getRow(at); if (index.compareRows(row, delete) != 0 || delete.getKey() != row.getKey()) { throw DbException.get(ErrorCode.ROW_NOT_FOUND_WHEN_DELETING_1, index.getSQL() + ": " + row); } index.getPageStore().logUndo(this, data); if (entryCount == 1) { // the page is now empty return row; } removeRow(at); memoryChange(); index.getPageStore().update(this); if (at == entryCount) { // the last row changed return getRow(at - 1); } // the last row didn't change return null; }
@Override SearchRow remove(SearchRow row) { int at = find(row, false, false, true); SearchRow delete = getRow(at); if (index.compareRows(row, delete) != 0 || delete.getKey() != row.getKey()) { throw DbException.get(ErrorCode.ROW_NOT_FOUND_WHEN_DELETING_1, index.getSQL() + ": " + row); } index.getPageStore().logUndo(this, data); if (entryCount == 1) { // the page is now empty return row; } removeRow(at); memoryChange(); index.getPageStore().update(this); if (at == entryCount) { // the last row changed return getRow(at - 1); } // the last row didn't change return null; }