private void initIdCursor() throws IOException { if(_systemCatalogIdCursor == null) { _systemCatalogIdCursor = _systemCatalog.newCursor() .setIndexByColumnNames(CAT_COL_ID) .toIndexCursor(); } }
/** * Creates an indexed cursor for the given table. * <p> * Note, index based table traversal may not include all rows, as certain * types of indexes do not include all entries (namely, some indexes ignore * null entries, see {@link Index#shouldIgnoreNulls}). * * @param index index for the table which will define traversal order as * well as enhance certain lookups */ public static IndexCursor createCursor(Index index) throws IOException { return index.getTable().newCursor().setIndex(index).toIndexCursor(); }
@Override protected Cursor getTableNamesCursor() throws IOException { return _systemCatalogCursor.getIndex().newCursor() .setStartEntry(_tableParentId, IndexData.MIN_VALUE) .setEndEntry(_tableParentId, IndexData.MAX_VALUE) .toIndexCursor(); }
private Iterator<Row> getComplexValFkIter( int complexValueFk, Collection<String> columnNames) throws IOException { if(_complexValIdCursor == null) { _complexValIdCursor = _flatTable.newCursor() .setIndexByColumns(_complexValFkCol) .toIndexCursor(); } return _complexValIdCursor.newEntryIterable(complexValueFk) .setColumnNames(columnNames).iterator(); }
/** * Creates an indexed cursor for the given table, narrowed to the given * range. * <p> * Note, index based table traversal may not include all rows, as certain * types of indexes do not include all entries (namely, some indexes ignore * null entries, see {@link Index#shouldIgnoreNulls}). * * @param index index for the table which will define traversal order as * well as enhance certain lookups * @param startRow the first row of data for the cursor (inclusive), or * {@code null} for the first entry * @param endRow the last row of data for the cursor (inclusive), or * {@code null} for the last entry */ public static IndexCursor createCursor(Index index, Object[] startRow, Object[] endRow) throws IOException { return index.getTable().newCursor().setIndex(index) .setStartRow(startRow) .setEndRow(endRow) .toIndexCursor(); }
IndexCursor primaryCursor = primaryIdx.newCursor().toIndexCursor(); Object[] entryValues = new Object[_secondaryCols.size()]; for(Row row : _secondaryTable.newCursor().toCursor()
.setIndexByColumnNames(CAT_COL_PARENT_ID, CAT_COL_NAME) .setColumnMatcher(CaseInsensitiveColumnMatcher.INSTANCE) .toIndexCursor()); } catch(IllegalArgumentException e) { if(LOG.isDebugEnabled()) {
.setEndRow(endRow) .setEndRowInclusive(endInclusive) .toIndexCursor();