Search in sources :

Example 1 with IndexAVL

use of org.hsqldb_voltpatches.index.IndexAVL in project voltdb by VoltDB.

the class TableBase method createIndexStructure.

final Index createIndexStructure(HsqlName name, int[] columns, boolean[] descending, boolean[] nullsLast, boolean unique, boolean constraint, boolean forward) {
    if (primaryKeyCols == null) {
        // A VoltDB extension to support matview-based indexes
        primaryKeyCols = new int[0];
    /* disable 1 line ...
            throw Error.runtimeError(ErrorCode.U_S0500, "createIndex");
            ... disabled 1 line */
    // End of VoltDB extension
    }
    int s = columns.length;
    int[] cols = new int[s];
    Type[] types = new Type[s];
    for (int j = 0; j < s; j++) {
        cols[j] = columns[j];
        types[j] = colTypes[cols[j]];
    }
    long id = database.persistentStoreCollection.getNextId();
    Index newIndex = new IndexAVL(name, id, this, cols, descending, nullsLast, types, false, unique, constraint, forward);
    return newIndex;
}
Also used : Type(org.hsqldb_voltpatches.types.Type) Index(org.hsqldb_voltpatches.index.Index) IndexAVL(org.hsqldb_voltpatches.index.IndexAVL)

Example 2 with IndexAVL

use of org.hsqldb_voltpatches.index.IndexAVL in project voltdb by VoltDB.

the class TableBase method createPrimaryIndex.

public final void createPrimaryIndex(int[] pkcols, Type[] pktypes, HsqlName name) {
    long id = database.persistentStoreCollection.getNextId();
    Index newindex = new IndexAVL(name, id, this, pkcols, null, null, pktypes, true, true, true, false);
    try {
        addIndex(newindex);
    } catch (HsqlException e) {
    }
}
Also used : Index(org.hsqldb_voltpatches.index.Index) IndexAVL(org.hsqldb_voltpatches.index.IndexAVL)

Aggregations

Index (org.hsqldb_voltpatches.index.Index)2 IndexAVL (org.hsqldb_voltpatches.index.IndexAVL)2 Type (org.hsqldb_voltpatches.types.Type)1