public MVDelegateIndex( MVTable table, int id, String name, MVPrimaryIndex mainIndex, IndexType indexType) { IndexColumn[] cols = IndexColumn.wrap(new Column[] {table.getColumn(mainIndex.getMainIndexColumn())}); this.initBaseIndex(table, id, name, cols, indexType); this.mainIndex = mainIndex; if (id < 0) { throw DbException.throwInternalError("" + name); } }
public PageDelegateIndex( TableData table, int id, String name, IndexType indexType, PageDataIndex mainIndex, int headPos, Session session) throws SQLException { IndexColumn[] columns = IndexColumn.wrap(new Column[] {table.getColumn(mainIndex.getMainIndexColumn())}); this.initBaseIndex(table, id, name, columns, indexType); this.mainIndex = mainIndex; if (!database.isPersistent() || id < 0) { throw Message.throwInternalError("" + name); } PageStore store = database.getPageStore(); store.addIndex(this); if (headPos == Index.EMPTY_HEAD) { store.addMeta(this, session); } }
/** * @param ctx Context. * @param tbl Table. * @param name Index name. */ public GridMergeIndexUnsorted(GridKernalContext ctx, GridMergeTable tbl, String name) { super(ctx, tbl, name, IndexType.createScan(false), IndexColumn.wrap(tbl.getColumns())); }