All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.sqlg.test.edges.TestEdgeSchemaCreation Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.umlg.sqlg.test.edges;

import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
import org.umlg.sqlg.test.BaseTest;

/**
 * Date: 2014/09/16
 * Time: 8:22 PM
 */
public class TestEdgeSchemaCreation extends BaseTest {

    @Test
    public void testEdgeSchemaCreation() {
        Vertex v1 = this.sqlgGraph.addVertex(T.label, "Person", "name", "a");
        Vertex v2 = this.sqlgGraph.addVertex(T.label, "Person", "name", "b");
        v1.addEdge("label1", v2);
        this.sqlgGraph.tx().commit();
        Vertex v3 = this.sqlgGraph.addVertex(T.label, "Product", "name", "c");
        Vertex v4 = this.sqlgGraph.addVertex(T.label, "Product", "name", "d");
        v1.addEdge("label1", v3);
        v1.addEdge("label1", v4);
        this.sqlgGraph.tx().commit();

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy