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

incubator-tinkerpop git commit: Replace some use of Graph.addVertex() in the docs.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master cb5ea9010 -> 831c4fc80


Replace some use of Graph.addVertex() in the docs.

We should prefer GraphTraversal.addV() where possible.


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

Branch: refs/heads/master
Commit: 831c4fc804e2296ea33a5d1e65ba836e3099a9fd
Parents: cb5ea90
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Nov 12 10:33:05 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Nov 12 10:33:05 2015 -0500

----------------------------------------------------------------------
 docs/src/the-graph.asciidoc | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/831c4fc8/docs/src/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-graph.asciidoc b/docs/src/the-graph.asciidoc
index eceec21..173196f 100644
--- a/docs/src/the-graph.asciidoc
+++ b/docs/src/the-graph.asciidoc
@@ -245,19 +245,21 @@ gremlin> graph.features()
 ...
 gremlin> graph.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.AUTO) <2>
 ==>org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph$Neo4jTransaction@1c067c0d
-gremlin> graph.addVertex("name","stephen")  <3>
+gremlin> g = graph.traversal()
+==>graphtraversalsource[neo4jgraph[org.neo4j.tinkerpop.api.impl.Neo4jGraphAPIImpl@32b6b301], standard]
+gremlin> g.addV("name","stephen")  <3>
 ==>v[0]
-gremlin> graph.tx().commit() <4>
+gremlin> g.tx().commit() <4>
 ==>null
-gremlin> graph.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.MANUAL) <5>
+gremlin> g.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.MANUAL) <5>
 ==>org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph$Neo4jTransaction@1c067c0d
-gremlin> graph.tx().isOpen()
+gremlin> g.tx().isOpen()
 ==>false
-gremlin> graph.addVertex("name","marko") <6>
+gremlin> g.addV("name","marko") <6>
 Open a transaction before attempting to read/write the transaction
-gremlin> graph.tx().open() <7>
+gremlin> g.tx().open() <7>
 ==>null
-gremlin> graph.addVertex("name","marko") <8>
+gremlin> g.addV("name","marko") <8>
 ==>v[1]
 gremlin> graph.tx().commit()
 ==>null