You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/06/03 02:12:34 UTC

[29/50] [abbrv] incubator-tinkerpop git commit: Neo4jGraph.cypher() provides the means by which indices are created. Updated docs. Fixed a bug in the IO docs around CoreIo.

Neo4jGraph.cypher() provides the means by which indices are created. Updated docs. Fixed a bug in the IO docs around CoreIo.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/14a86ee3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/14a86ee3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/14a86ee3

Branch: refs/heads/preprocessor
Commit: 14a86ee350c42f0b233ab55b34a09fe311f44c16
Parents: 38a225e
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri May 29 15:50:57 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri May 29 15:50:57 2015 -0600

----------------------------------------------------------------------
 docs/src/implementations.asciidoc               | 33 +++++-------
 docs/src/the-graph.asciidoc                     | 26 +++++-----
 .../gremlin/neo4j/structure/Neo4jGraph.java     |  4 --
 .../structure/NativeNeo4jStructureTest.java     | 54 ++++++++++----------
 4 files changed, 52 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/14a86ee3/docs/src/implementations.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/implementations.asciidoc b/docs/src/implementations.asciidoc
index d5f5632..3bad2a9 100644
--- a/docs/src/implementations.asciidoc
+++ b/docs/src/implementations.asciidoc
@@ -545,10 +545,12 @@ CAUTION: Unless under a commercial agreement with Neo Technology, Neo4j is licen
 [source,groovy]
 ----
 gremlin> :install org.apache.tinkerpop neo4j-gremlin x.y.z
-==>loaded: [org.apache.tinkerpop, neo4j-gremlin, x.y.z]
+==>Loaded: [org.apache.tinkerpop, neo4j-gremlin, x.y.z] - restart the console to use [tinkerpop.neo4j]
+gremlin> :q
+...
 gremlin> :plugin use tinkerpop.neo4j
 ==>tinkerpop.neo4j activated
-gremlin> g = Neo4jGraph.open('/tmp/neo4j')
+gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
 ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
 ----
 
@@ -573,13 +575,8 @@ The Gremlin-Console session below demonstrates Neo4j indices. For more informati
 [source,groovy]
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
 ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
-gremlin> graph.tx().open() // direct Neo4j access requires explicit transaction creation
-==>null
-gremlin> import org.neo4j.graphdb.*
-...
-gremlin> graph.getBaseGraph().schema().indexFor(DynamicLabel.label('person')).on('name').create()
-==>IndexDefinition[label:person, on:name]
-gremlin> graph.tx().commit()
+gremlin> graph.cypher("CREATE INDEX ON :person(name)")
+gremlin> graph.tx().commit() // schema mutations must happen in a different tx than graph mutations
 ==>null
 gremlin> graph.addVertex(label,'person','name','marko')
 ==>v[0]
@@ -595,15 +592,10 @@ Below demonstrates the runtime benefits of indices and demonstrates how if there
 [source,groovy]
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
 ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
-gremlin> graph.tx().open()
-==>null
-gremlin> import org.neo4j.graphdb.*
-...
-gremlin> graph.getBaseGraph().schema().indexFor(DynamicLabel.label('artist')).on('name').create() <1>
-==>IndexDefinition[label:artist, on:name]
+gremlin> graph.cypher("CREATE INDEX ON :artist(name)") <1>
 gremlin> graph.tx().commit()
 ==>null
-gremlin> graph.io().readGraphML('data/grateful-dead.xml')
+gremlin> graph.io(graphml()).readGraph('data/grateful-dead.xml')
 ==>null
 gremlin> g = graph.traversal(standard())
 ==>graphtraversalsource[neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]], standard]
@@ -611,8 +603,7 @@ gremlin> clock(1000){g.V().hasLabel('artist').has('name','Garcia').next()}  <2>
 ==>0.0585639999999997
 gremlin> clock(1000){g.V().has('name','Garcia').next()} <3>
 ==>0.6039889999999992
-gremlin> g.getBaseGraph().schema().getIndexes(DynamicLabel.label('artist')).iterator().next().drop() <4>
-==>null
+gremlin> graph.cypher("DROP INDEX ON :artist(name)") <4>
 gremlin> g.tx().commit()
 ==>null
 gremlin> clock(1000){g.V().hasLabel('artist').has('name','Garcia').next()} <5>
@@ -620,10 +611,10 @@ gremlin> clock(1000){g.V().hasLabel('artist').has('name','Garcia').next()} <5>
 gremlin> clock(1000){g.V().has('name','Garcia').next()} <6>
 ==>0.6293959999999993
 
-<1> Create a schema index for all artist vertices on their name property.
+<1> Create an index for all artist vertices on their name property.
 <2> Find all artists whose name is Garcia which uses the pre-defined schema index.
 <3> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
-<4> Drop the created index schema.
+<4> Drop the created index.
 <5> Find all artists whose name is Garcia which does a linear scan of the artist vertex-label partition.
 <6> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
 
@@ -637,7 +628,7 @@ NeoTechnology are the creators of the graph pattern-match query language link:ht
 [source,groovy]
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
 ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
-gremlin> graph.io().readGryo('data/tinkerpop-modern.kryo')
+gremlin> graph.io(gryo()).readGraph('data/tinkerpop-modern.kryo')
 ==>null
 gremlin> graph.cypher('MATCH (a {name:"marko"}) RETURN a')
 ==>[a:v[0]]

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/14a86ee3/docs/src/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-graph.asciidoc b/docs/src/the-graph.asciidoc
index 8db78ed..1a761f4 100644
--- a/docs/src/the-graph.asciidoc
+++ b/docs/src/the-graph.asciidoc
@@ -276,9 +276,9 @@ The following code shows how to write a `Graph` instance to file called `tinkerp
 [source,java]
 ----
 final Graph graph = TinkerFactory.createModern();
-graph.io(CoreIo.graphml()).writeGraph("tinkerpop-modern.xml");
+graph.io(IoCore.graphml()).writeGraph("tinkerpop-modern.xml");
 final Graph newGraph = TinkerGraph.open();
-newGraph.io(CoreIo.graphml()).readGraph("tinkerpop-modern.xml");
+newGraph.io(IoCore.graphml()).readGraph("tinkerpop-modern.xml");
 ----
 
 If a custom configuration is required, then have the `Graph` generate a `GraphReader` or `GraphWriter` "builder" instance:
@@ -287,12 +287,12 @@ If a custom configuration is required, then have the `Graph` generate a `GraphRe
 ----
 final Graph graph = TinkerFactory.createModern();
 try (final OutputStream os = new FileOutputStream("tinkerpop-modern.xml")) {
-    graph.io(CoreIo.graphml()).writer().normalize(true).create().writeGraph(os, graph);
+    graph.io(IoCore.graphml()).writer().normalize(true).create().writeGraph(os, graph);
 }
 
 final Graph newGraph = TinkerGraph.open();
 try (final InputStream stream = new FileInputStream("tinkerpop-modern.xml")) {
-    newGraph.io(CoreIo.graphml()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
+    newGraph.io(IoCore.graphml()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
 }
 ----
 
@@ -310,10 +310,10 @@ GraphSON supports all of the `GraphReader` and `GraphWriter` interface methods a
 [source,java]
 ----
 final Graph graph = TinkerFactory.createModern();
-graph.io(CoreIo.graphson()).writeGraph("tinkerpop-modern.json");
+graph.io(IoCore.graphson()).writeGraph("tinkerpop-modern.json");
 
 final Graph newGraph = TinkerGraph.open();
-newGraph.io(CoreIo.graphson()).readGraph("tinkerpop-modern.json");
+newGraph.io(IoCore.graphson()).readGraph("tinkerpop-modern.json");
 ----
 
 If a custom configuration is required, then have the `Graph` generate a `GraphReader` or `GraphWriter` "builder" instance:
@@ -322,13 +322,13 @@ If a custom configuration is required, then have the `Graph` generate a `GraphRe
 ----
 final Graph graph = TinkerFactory.createModern();
 try (final OutputStream os = new FileOutputStream("tinkerpop-modern.json")) {
-    final GraphSONMapper mapper = graph.io(CoreIo.graphson()).mapper().normalize(true).create()
-    graph.io(CoreIo.graphson()).writer().mapper(mapper).create().writeGraph(os, graph)
+    final GraphSONMapper mapper = graph.io(IoCore.graphson()).mapper().normalize(true).create()
+    graph.io(IoCore.graphson()).writer().mapper(mapper).create().writeGraph(os, graph)
 }
 
 final Graph newGraph = TinkerGraph.open();
 try (final InputStream stream = new FileInputStream("tinkerpop-modern.json")) {
-    newGraph.io(CoreIo.graphson()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
+    newGraph.io(IoCore.graphson()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
 }
 ----
 
@@ -507,10 +507,10 @@ Kryo supports all of the `GraphReader` and `GraphWriter` interface methods and c
 [source,java]
 ----
 final Graph graph = TinkerFactory.createModern();
-graph.io(CoreIo.gryo()).writeGraph("tinkerpop-modern.kryo");
+graph.io(IoCore.gryo()).writeGraph("tinkerpop-modern.kryo");
 
 final Graph newGraph = TinkerGraph.open();
-newGraph.io(CoreIo.gryo()).readGraph("tinkerpop-modern.kryo")'
+newGraph.io(IoCore.gryo()).readGraph("tinkerpop-modern.kryo")'
 ----
 
 If a custom configuration is required, then have the `Graph` generate a `GraphReader` or `GraphWriter` "builder" instance:
@@ -519,12 +519,12 @@ If a custom configuration is required, then have the `Graph` generate a `GraphRe
 ----
 final Graph graph = TinkerFactory.createModern();
 try (final OutputStream os = new FileOutputStream("tinkerpop-modern.kryo")) {
-    graph.io(CoreIo.gryo()).writer().create().writeGraph(os, graph);
+    graph.io(IoCore.gryo()).writer().create().writeGraph(os, graph);
 }
 
 final Graph newGraph = TinkerGraph.open();
 try (final InputStream stream = new FileInputStream("tinkerpop-modern.kryo")) {
-    newGraph.io(CoreIo.gryo()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
+    newGraph.io(IoCore.gryo()).reader().vertexIdKey("name").create().readGraph(stream, newGraph);
 }
 ----
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/14a86ee3/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index ae83677..31aa0c5 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -307,10 +307,6 @@ public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
         return traversal;
     }
 
-    public Iterator<Map<String, Object>> execute(String query, Map<String, Object> params) {
-        return new Neo4jCypherIterator(baseGraph.execute(query, params), this);
-    }
-
     class Neo4jTransaction extends AbstractTransaction {
 
         protected final ThreadLocal<Neo4jTx> threadLocalTx = ThreadLocal.withInitial(() -> null);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/14a86ee3/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
index 8db88f9..dc29a91 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
@@ -159,8 +159,8 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     @Test
     public void shouldEnforceMultipleUniqueConstraint() {
         this.graph.tx().readWrite();
-        this.getGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
-        this.getGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.surname is unique", null);
+        this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
+        this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.surname is unique", null);
         this.graph.tx().commit();
         this.graph.addVertex(T.label, "Person", "name", "marko");
         this.graph.addVertex(T.label, "Person", "surname", "aaaa");
@@ -189,8 +189,8 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     @Test
     public void shouldDropMultipleUniqueConstraint() {
         this.graph.tx().readWrite();
-        this.getGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
-        this.getGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.surname is unique", null);
+        this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
+        this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.surname is unique", null);
         this.graph.tx().commit();
 
         this.graph.addVertex(T.label, "Person", "name", "marko");
@@ -213,8 +213,8 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
         this.graph.tx().commit();
 
         this.graph.tx().readWrite();
-        this.getGraph().execute("DROP CONSTRAINT ON (p:Person) assert p.name is unique", null);
-        this.getGraph().execute("DROP CONSTRAINT ON (p:Person) assert p.surname is unique", null);
+        this.getBaseGraph().execute("DROP CONSTRAINT ON (p:Person) assert p.name is unique", null);
+        this.getBaseGraph().execute("DROP CONSTRAINT ON (p:Person) assert p.surname is unique", null);
 
         this.graph.tx().commit();
         assertEquals(1, this.g.V().has(T.label, "Person").has("name", "marko").count().next(), 0);
@@ -229,7 +229,7 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     @Test(expected = RuntimeException.class)
     public void shouldFailUniqueConstraint() {
         this.graph.tx().readWrite();
-        this.getGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
+        this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
         this.graph.tx().commit();
         this.graph.addVertex(T.label, "Person", "name", "marko");
         this.graph.tx().commit();
@@ -311,7 +311,7 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
     public void shouldSupportVertexPropertyToVertexMappingOnIndexCalls() {
         graph.tx().readWrite();
-        this.getGraph().execute("CREATE INDEX ON :person(name)", null);
+        this.getBaseGraph().execute("CREATE INDEX ON :person(name)", null);
 //            this.graph.getBaseGraph().execute("CREATE INDEX ON :name(" + T.value.getAccessor() + ")", null);
         this.graph.tx().commit();
 
@@ -366,9 +366,9 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     public void shouldDoLabelsNamespaceBehavior() {
         graph.tx().readWrite();
 
-        this.getGraph().execute("CREATE INDEX ON :Person(name)", null);
-        this.getGraph().execute("CREATE INDEX ON :Product(name)", null);
-        this.getGraph().execute("CREATE INDEX ON :Corporate(name)", null);
+        this.getBaseGraph().execute("CREATE INDEX ON :Person(name)", null);
+        this.getBaseGraph().execute("CREATE INDEX ON :Product(name)", null);
+        this.getBaseGraph().execute("CREATE INDEX ON :Corporate(name)", null);
 
         this.graph.tx().commit();
         this.graph.addVertex(T.label, "Person", "name", "marko");
@@ -447,16 +447,16 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
             // assertEquals(1, b.properties("location").count().next().intValue());
             assertEquals(0, g.E().count().next().intValue());
 
-            assertEquals(4l, this.getGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
-            assertEquals(2l, this.getGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
-            assertEquals(2l, this.getGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(4l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
+            assertEquals(2l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(2l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
             final AtomicInteger counter = new AtomicInteger(0);
             a.getBaseVertex().relationships(Neo4jDirection.OUTGOING).forEach(relationship -> {
                 assertEquals(MultiMetaNeo4jTrait.VERTEX_PROPERTY_PREFIX.concat("name"), relationship.type());
                 counter.incrementAndGet();
             });
             assertEquals(2, counter.getAndSet(0));
-            this.getGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
+            this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
                 assertEquals(VertexProperty.DEFAULT_LABEL, ((List<String>) results.get("labels(m)")).get(0));
                 counter.incrementAndGet();
             });
@@ -484,8 +484,8 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
             //  assertEquals(1, b.properties("name").count().next().intValue());
             // assertEquals(1, b.properties("location").count().next().intValue());
             assertEquals(0, g.E().count().next().intValue());
-            assertEquals(2l, this.getGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
-            assertEquals(0l, this.getGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(2l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
+            assertEquals(0l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
 
             assertEquals(1, IteratorUtils.count(a.getBaseVertex().getKeys()));
             assertEquals("the marko", a.getBaseVertex().getProperty("name"));
@@ -500,8 +500,8 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
             //    assertEquals(0, a.properties().count().next().intValue());
             //   assertEquals(2, b.properties().count().next().intValue());
             assertEquals(0, g.E().count().next().intValue());
-            assertEquals(2l, this.getGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
-            assertEquals(0l, this.getGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(2l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
+            assertEquals(0l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
             assertEquals(0, IteratorUtils.count(a.getBaseVertex().getKeys()));
             assertEquals(2, IteratorUtils.count(b.getBaseVertex().getKeys()));
         });
@@ -515,16 +515,16 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
             // assertEquals(1, b.properties("location").count().next().intValue());
             assertEquals(0, g.E().count().next().intValue());
 
-            assertEquals(3l, this.getGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
-            assertEquals(1l, this.getGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
-            assertEquals(1l, this.getGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(3l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
+            assertEquals(1l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(1l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
             final AtomicInteger counter = new AtomicInteger(0);
             a.getBaseVertex().relationships(Neo4jDirection.OUTGOING).forEach(relationship -> {
                 assertEquals(MultiMetaNeo4jTrait.VERTEX_PROPERTY_PREFIX.concat("name"), relationship.type());
                 counter.incrementAndGet();
             });
             assertEquals(1, counter.getAndSet(0));
-            this.getGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
+            this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
                 assertEquals(VertexProperty.DEFAULT_LABEL, ((List<String>) results.get("labels(m)")).get(0));
                 counter.incrementAndGet();
             });
@@ -559,16 +559,16 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
              //assertEquals(1, b.properties("location").count().next().intValue());
              assertEquals(0, g.E().count().next().intValue());
 
-            assertEquals(3l, this.getGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
-            assertEquals(1l, this.getGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
-            assertEquals(1l, this.getGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(3l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)"));
+            assertEquals(1l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)"));
+            assertEquals(1l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)"));
             final AtomicInteger counter = new AtomicInteger(0);
             a.getBaseVertex().relationships(Neo4jDirection.OUTGOING).forEach(relationship -> {
                 assertEquals(MultiMetaNeo4jTrait.VERTEX_PROPERTY_PREFIX.concat("name"), relationship.type());
                 counter.incrementAndGet();
             });
             assertEquals(1, counter.getAndSet(0));
-            this.getGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
+            this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> {
                 assertEquals(VertexProperty.DEFAULT_LABEL, ((List<String>) results.get("labels(m)")).get(0));
                 counter.incrementAndGet();
             });