private Cursor find(Row row) { if (index == null) { // for the case "in(select ...)", the query might // use an optimization and not create the index // up front createIndex(); } Cursor cursor = index.find(session, row, row); while (cursor.next()) { SearchRow found = cursor.getSearchRow(); boolean ok = true; Database db = session.getDatabase(); for (int i = 0; i < row.getColumnCount(); i++) { if (!db.areEqual(row.getValue(i), found.getValue(i))) { ok = false; break; } } if (ok) { return cursor; } } return null; }
public void setKeyAndVersion(SearchRow row) { setKey(row.getKey()); setVersion(row.getVersion()); }
@Override public void setKeyAndVersion(SearchRow row) { key = row.getKey(); version = row.getVersion(); }