Package com.orientechnologies.orient.core.metadata.schema

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createIndex()


    oClass.createIndex("indexfour", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop4", "prop1", "prop3");
    oClass.createIndex("indexfive", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop6", "prop1", "prop3");
    oClass.createIndex("indexsix", OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX, "prop7");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKey", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedMap");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValue", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMap by value");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedList", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedList");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo", "prop8");
View Full Code Here


    oClass.createIndex("indexsix", OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX, "prop7");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKey", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedMap");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValue", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMap by value");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedList", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedList");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo", "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo by value", "prop8");
View Full Code Here

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKey", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedMap");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValue", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMap by value");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedList", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedList");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo", "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo by value", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
View Full Code Here

        "fEmbeddedMap by value");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedList", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedList");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo", "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo by value", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
        "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestProp9EmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop9",
View Full Code Here

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo", "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo by value", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
        "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestProp9EmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop9",
        "fEmbeddedSetTwo", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedListTwoProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
View Full Code Here

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedMapTwo by value", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
        "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestProp9EmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop9",
        "fEmbeddedSetTwo", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedListTwoProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedListTwo", "prop8");
View Full Code Here

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
        "prop8");
    oClass.createIndex("sqlSelectHashIndexReuseTestProp9EmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop9",
        "fEmbeddedSetTwo", "prop8");

    oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedListTwoProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
        "fEmbeddedListTwo", "prop8");

    schema.save();

    final String fullTextIndexStrings[] = { "Alice : What is the use of a book, without pictures or conversations?",
View Full Code Here

    final OClass superClass = schema.createClass("sqlSelectHashIndexReuseTestSuperClass");
    superClass.createProperty("prop0", OType.INTEGER);
    final OClass oClass = schema.createClass("sqlSelectHashIndexReuseTestChildClass", superClass);
    oClass.createProperty("prop1", OType.INTEGER);

    oClass.createIndex("sqlSelectHashIndexReuseTestOnPropertiesFromClassAndSuperclass", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX,
        "prop0", "prop1");

    schema.save();

    long oldIndexUsage = profiler.getCounter("db.demo.query.indexUsed");
View Full Code Here

    long oldcompositeIndexUsed = profiler.getCounter("db.demo.query.compositeIndexUsed");

    OClass klazz = database.getMetadata().getSchema().getOrCreateClass("CountFunctionWithNotUniqueHashIndex");
    if (!klazz.existsProperty("a")) {
      klazz.createProperty("a", OType.STRING);
      klazz.createIndex("CountFunctionWithNotUniqueHashIndex_A", "NOTUNIQUE_HASH_INDEX", "a");
    }

    ODocument doc = database.newInstance("CountFunctionWithNotUniqueHashIndex").field("a", "a").field("b", "b").save();

    ODocument result = (ODocument) database.query(
View Full Code Here

    long oldcompositeIndexUsed = profiler.getCounter("db.demo.query.compositeIndexUsed");

    OClass klazz = database.getMetadata().getSchema().getOrCreateClass("CountFunctionWithUniqueHashIndex");
    if (!klazz.existsProperty("a")) {
      klazz.createProperty("a", OType.STRING);
      klazz.createIndex("CountFunctionWithUniqueHashIndex_A", "UNIQUE_HASH_INDEX", "a");
    }

    ODocument doc = database.newInstance("CountFunctionWithUniqueHashIndex").field("a", "a").field("b", "b").save();

    ODocument result = (ODocument) database.query(
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.