Examples of addIndex()


Examples of cz.startnet.utils.pgdiff.schema.PgSchema.addIndex()

                    statement));
        }

        final PgIndex index = new PgIndex(indexName);
        table.addIndex(index);
        schema.addIndex(index);
        index.setDefinition(definition.trim());
        index.setTableName(table.getName());
        index.setUnique(unique);
    }
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgTable.addIndex()

                    Resources.getString("CannotFindTable"), tableName,
                    statement));
        }

        final PgIndex index = new PgIndex(indexName);
        table.addIndex(index);
        schema.addIndex(index);
        index.setDefinition(definition.trim());
        index.setTableName(table.getName());
        index.setUnique(unique);
    }
View Full Code Here

Examples of de.bwaldvogel.mongo.backend.MongoCollection.addIndex()

        indexes.addDocument(indexDescription);

        BSONObject key = (BSONObject) indexDescription.get("key");
        if (key.keySet().equals(Collections.singleton("_id"))) {
            boolean ascending = Utils.normalizeValue(key.get("_id")).equals(Double.valueOf(1.0));
            collection.addIndex(new UniqueIndex("_id", ascending));
            log.info("adding unique _id index for collection {}", collectionName);
        } else if (Utils.isTrue(indexDescription.get("unique"))) {
            if (key.keySet().size() != 1) {
                throw new MongoServerException("Compound unique indices are not yet implemented");
            }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.database.Database.addIndex()

  public void run() {
    final Database database = inputstep.getDatabase();
    final Relation<O> relation = database.getRelation(distf.getInputTypeRestriction());
    logger.verbose("Running preprocessor ...");
    MaterializeKNNPreprocessor<O, D> preproc = new MaterializeKNNPreprocessor<O, D>(relation, distf, maxk + 2);
    database.addIndex(preproc);

    // Test that we did get a proper index query
    KNNQuery<O, D> knnq = QueryUtil.getKNNQuery(relation, distf);
    if(!(knnq instanceof PreprocessorKNNQuery)) {
      logger.warning("Not using preprocessor knn query -- KNN queries using class: " + knnq.getClass());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.database.UpdatableDatabase.addIndex()

    config.addParameter(MaterializeKNNPreprocessor.Factory.K_ID, k);
    MaterializeKNNAndRKNNPreprocessor<DoubleVector, DoubleDistance> preproc = new MaterializeKNNAndRKNNPreprocessor<DoubleVector, DoubleDistance>(rep, distanceQuery.getDistanceFunction(), k);
    KNNQuery<DoubleVector, DoubleDistance> preproc_knn_query = preproc.getKNNQuery(distanceQuery, k);
    RKNNQuery<DoubleVector, DoubleDistance> preproc_rknn_query = preproc.getRKNNQuery(distanceQuery);
    // add as index
    db.addIndex(preproc);
    assertTrue("Preprocessor knn query class incorrect.", !(preproc_knn_query instanceof LinearScanKNNQuery));
    assertTrue("Preprocessor rknn query class incorrect.", !(preproc_rknn_query instanceof LinearScanKNNQuery));

    // test queries
    testKNNQueries(rep, lin_knn_query, preproc_knn_query, k);
View Full Code Here

Examples of er.extensions.migration.ERXMigrationTable.addIndex()

  @Override
  public void upgrade(EOEditingContext editingContext, ERXMigrationDatabase database) throws Throwable {
    ERXMigrationTable companyTable = database.existingTableNamed("Company");
    companyTable.newIntegerColumn("logoID", true);
    companyTable.addIndex("name");

    ERXMigrationTable employeeTable = database.existingTableNamed("Employee");
    employeeTable.addIndex("lastName");

    companyTable.addForeignKey("logoID", "ERAttachment", "id");
View Full Code Here

Examples of javassist.bytecode.Bytecode.addIndex()

    code.addAload(0);
    // getfield // get field "$JAVASSIST_CALLBACK" defined already
    code.addOpcode(Opcode.GETFIELD);
    int field_index = cp.addFieldrefInfo(this_class_index,
                                         HANDLER_FIELD_NAME, HANDLER_FIELD_DESCRIPTOR);
    code.addIndex(field_index);
    // areturn // return the value of the field
    code.addOpcode(Opcode.ARETURN);
    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    classfile.addMethod(minfo);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addIndex()

    code.addAload(1);
    // putfield // put field "$JAVASSIST_CALLBACK" defined already
    code.addOpcode(Opcode.PUTFIELD);
    int field_index = cp.addFieldrefInfo(this_class_index,
                                         HANDLER_FIELD_NAME, HANDLER_FIELD_DESCRIPTOR);
    code.addIndex(field_index);
    // return
    code.addOpcode(Opcode.RETURN);
    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    classfile.addMethod(minfo);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addIndex()

    code.addAload(0);
    // getfield // get each field
    code.addOpcode(Opcode.GETFIELD);
    int base_field_index = cp.addFieldrefInfo(this_class_index, finfo
        .getName(), finfo.getDescriptor());
    code.addIndex(base_field_index);
    // aload_0
    code.addAload(0);
    // invokeinterface // invoke Enabled.getInterceptFieldCallback()
    int enabled_class_index = cp.addClassInfo(FIELD_HANDLED_TYPE_NAME);
    code.addInvokeinterface(enabled_class_index,
View Full Code Here

Examples of javassist.bytecode.Bytecode.addIndex()

    code.addInvokeinterface(enabled_class_index,
                            GETFIELDHANDLER_METHOD_NAME, GETFIELDHANDLER_METHOD_DESCRIPTOR,
                            1);
    // ifnonnull
    code.addOpcode(Opcode.IFNONNULL);
    code.addIndex(4);
    // *return // each type
    addTypeDependDataReturn(code, finfo.getDescriptor());
    // *store_1 // each type
    addTypeDependDataStore(code, finfo.getDescriptor(), 1);
    // aload_0
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.