public PageDelegateIndex(RegularTable table, int id, String name, IndexType indexType, PageDataIndex mainIndex, boolean create, Session session) { IndexColumn[] cols = IndexColumn.wrap( new Column[] { table.getColumn(mainIndex.getMainIndexColumn())}); this.initBaseIndex(table, id, name, cols, indexType); this.mainIndex = mainIndex; if (!database.isPersistent() || id < 0) { throw DbException.throwInternalError("" + name); } PageStore store = database.getPageStore(); store.addIndex(this); if (create) { store.addMeta(this, session); } }
public PageDelegateIndex(RegularTable table, int id, String name, IndexType indexType, PageDataIndex mainIndex, boolean create, Session session) { IndexColumn[] cols = IndexColumn.wrap( new Column[] { table.getColumn(mainIndex.getMainIndexColumn())}); this.initBaseIndex(table, id, name, cols, indexType); this.mainIndex = mainIndex; if (!database.isPersistent() || id < 0) { throw DbException.throwInternalError("" + name); } PageStore store = database.getPageStore(); store.addIndex(this); if (create) { store.addMeta(this, session); } }
public PageDelegateIndex(RegularTable table, int id, String name, IndexType indexType, PageDataIndex mainIndex, boolean create, Session session) { IndexColumn[] cols = IndexColumn.wrap( new Column[] { table.getColumn(mainIndex.getMainIndexColumn())}); this.initBaseIndex(table, id, name, cols, indexType); this.mainIndex = mainIndex; if (!database.isPersistent() || id < 0) { throw DbException.throwInternalError("" + name); } PageStore store = database.getPageStore(); store.addIndex(this); if (create) { store.addMeta(this, session); } }