Package org.neo4j.graphdb.schema

Examples of org.neo4j.graphdb.schema.Schema


    @Test
    public void shouldSupportVertexPropertyToVertexMappingOnIndexCalls() {
        // todo: review this feature check - this test does a lot of stuff - maybe losing some important assertions this way
        if (g.features().vertex().supportsMultiProperties()) {
            g.tx().readWrite();
            final Schema schema = g.getBaseGraph().schema();
            schema.indexFor(DynamicLabel.label("person")).on("name").create();
            schema.indexFor(DynamicLabel.label("name")).on(T.value.getAccessor()).create();
            this.g.tx().commit();

            final Vertex a = g.addVertex(T.label, "person", "name", "marko", "age", 34);
            a.property("name", "okram");
            a.property("name", "marko a. rodriguez");
View Full Code Here


    @Test
    public void shouldDoLabelsNameSpaceBehavior() {
        g.tx().readWrite();

        final Schema schema = g.getBaseGraph().schema();
        schema.indexFor(DynamicLabel.label("Person")).on("name").create();
        schema.indexFor(DynamicLabel.label("Product")).on("name").create();
        schema.indexFor(DynamicLabel.label("Corporate")).on("name").create();

        this.g.tx().commit();
        this.g.addVertex(T.label, "Person", "name", "marko");
        this.g.addVertex(T.label, "Person", "name", "john");
        this.g.addVertex(T.label, "Person", "name", "pete");
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.schema.Schema

Copyright © 2018 www.massapicom. 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.