Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/dev/provider/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ include::../../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Dev/Pr
==== RemoteConnection Implementations

A `RemoteConnection` is an interface that is important for usage on traversal sources configured using the
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#connecting-via-drivers[withRemote()] option. A `Traversal`
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#connecting-via-drivers[with()] option. A `Traversal`
that is generated from that source will apply a `RemoteStrategy` which will inject a `RemoteStep` to its end. That
step will then send the `Bytecode` of the `Traversal` over the `RemoteConnection` to get the results that it will
iterate.
Expand Down Expand Up @@ -1251,7 +1251,7 @@ To demonstrate consider this example:
cluster = Cluster.open()
client = cluster.connect()
aliased = client.alias("g")
g = traversal().withEmbedded(org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph.instance()) <1>
g = traversal().with(org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph.instance()) <1>
rs = aliased.submit(g.V().both().barrier().both().barrier()).all().get() <2>
aliased.submit(g.V().both().barrier().both().barrier().count()).all().get().get(0).getInt() <3>
rs.collect{[value: it.getObject().get(), bulk: it.getObject().bulk()]} <4>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/recipes/centrality.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,6 @@ link:https://tinkerpop.apache.org/docs/x.y.z/reference/#pagerank-step[pageRank()

[gremlin-groovy,modern]
----
g = traversal().withEmbedded(graph).withComputer()
g = traversal().with(graph).withComputer()
g.V().pageRank().with(PageRank.propertyName,'pageRank').values('pageRank')
----
2 changes: 1 addition & 1 deletion docs/src/recipes/olap-spark-yarn.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ conf.setProperty('spark.executor.extraLibraryPath', "$hadoop/lib/native:$hadoop/
conf.setProperty('gremlin.spark.persistContext', 'true')
hdfs.copyFromLocal('data/tinkerpop-modern.kryo', 'tinkerpop-modern.kryo')
graph = GraphFactory.open(conf)
g = traversal().withEmbedded(graph).withComputer(SparkGraphComputer)
g = traversal().with(graph).withComputer(SparkGraphComputer)
g.V().group().by(values('name')).by(both().count())
----

Expand Down
6 changes: 3 additions & 3 deletions docs/src/reference/compilers.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ may be used as follows:
[gremlin-groovy,modern]
----
graph = TinkerFactory.createModern()
g = traversal(SparqlTraversalSource).withEmbedded(graph) <1>
g = traversal(SparqlTraversalSource).with(graph) <1>
g.sparql("""SELECT ?name ?age
WHERE { ?person v:name ?name . ?person v:age ?age }
ORDER BY ASC(?age)""") <2>
Expand Down Expand Up @@ -388,7 +388,7 @@ graph.

[gremlin-groovy,theCrew]
----
g = traversal(SparqlTraversalSource).withEmbedded(graph)
g = traversal(SparqlTraversalSource).with(graph)
g.sparql("""SELECT ?name ?startTime
WHERE {
?person v:name "daniel" .
Expand Down Expand Up @@ -422,7 +422,7 @@ steps as shown below:

[gremlin-groovy,modern]
----
g = traversal(SparqlTraversalSource).withEmbedded(graph)
g = traversal(SparqlTraversalSource).with(graph)
g.sparql("SELECT ?name ?age WHERE { ?person v:name ?name . ?person v:age ?age }")
g.sparql("SELECT ?name ?age WHERE { ?person v:name ?name . ?person v:age ?age }").select("name")
g.sparql("SELECT * WHERE { }").out("knows").values("name")
Expand Down
26 changes: 13 additions & 13 deletions docs/src/reference/gremlin-applications.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The "toy" graph provides a way to get started with Gremlin quickly.

[gremlin-groovy]
----
g = traversal().withEmbedded(TinkerFactory.createModern())
g = traversal().with(TinkerFactory.createModern())
g.V()
g.V().values('name')
g.V().has('name','marko').out('knows').values('name')
Expand Down Expand Up @@ -315,7 +315,7 @@ from the command line. Consider the following file named `gremlin.groovy`:
[source,groovy]
----
graph = TinkerFactory.createModern()
g = traversal().withEmbedded(graph)
g = traversal().with(graph)
g.V().each { println it }
----

Expand All @@ -341,7 +341,7 @@ to system out:
[source,groovy]
----
graph = TinkerFactory.createModern()
g = traversal().withEmbedded(graph)
g = traversal().with(graph)
g.V().has('name',args[0]).each { println it }
----

Expand Down Expand Up @@ -381,7 +381,7 @@ graph might create a script called `init.groovy` like:
[source,groovy]
----
graph = TinkerFactory.createModern()
g = traversal().withEmbedded(graph)
g = traversal().with(graph)
----

and then start Gremlin Console as follows:
Expand Down Expand Up @@ -569,7 +569,7 @@ params.put("name","marko");
List<Result> list = client.submit("g.V().has('person','name',name).out('knows')", params).all().get();

// bytecode
GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using("localhost",8182,"g"));
GraphTraversalSource g = traversal().with(DriverRemoteConnection.using("localhost",8182,"g"));
List<Vertex> list = g.V().has("person","name","marko").out("knows").toList();
----
[source,groovy]
Expand All @@ -580,7 +580,7 @@ def client = cluster.connect()
def list = client.submit("g.V().has('person','name',name).out('knows')", [name: "marko"]).all().get();

// bytecode
def g = traversal().withRemote(DriverRemoteConnection.using("localhost",8182,"g"))
def g = traversal().with(DriverRemoteConnection.using("localhost",8182,"g"))
def list = g.V().has('person','name','marko').out('knows').toList()
----
[source,csharp]
Expand All @@ -595,7 +595,7 @@ const conn = client.open();
const list = conn.submit("g.V().has('person','name',name).out('knows')",{name: 'marko'}).then(function (response) { ... });

// bytecode
const g = gtraversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin'));
const g = gtraversal().with(new DriverRemoteConnection('ws://localhost:8182/gremlin'));
const list = g.V().has("person","name","marko").out("knows").toList();
----
[source,python]
Expand All @@ -605,7 +605,7 @@ client = Client('ws://localhost:8182/gremlin', 'g')
list = client.submit("g.V().has('person','name',name).out('knows')",{'name': 'marko'}).all()

# bytecode
g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
g = traversal().with(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
list = g.V().has("person","name","marko").out("knows").toList()
----
[source,go]
Expand All @@ -618,7 +618,7 @@ result, err := resultSet.All()

// bytecode
remote, err := NewDriverRemoteConnection("ws://localhost:8182/gremlin")
g := Traversal_().WithRemote(remote)
g := Traversal_().With(remote)
list, err := g.V().Has("person", "name", "marko").Out("knows").ToList()
----

Expand Down Expand Up @@ -1131,7 +1131,7 @@ method for processing script evaluation requests.
[[traversalopprocessor]]
===== TraversalOpProcessor

The `TraversalOpProcessor` provides a way to accept traversals configured via <<connecting-via-drivers,withRemote()>>.
The `TraversalOpProcessor` provides a way to accept traversals configured via <<connecting-via-drivers,with()>>.
It has no special configuration settings.

==== Serialization
Expand Down Expand Up @@ -1543,7 +1543,7 @@ Please see the example usage as follows:
----
graph = TinkerGraph.open()
graph.createIndex("username",Vertex.class)
credentials = traversal(CredentialTraversalSource.class).withEmbedded(graph)
credentials = traversal(CredentialTraversalSource.class).with(graph)
credentials.user("stephen","password")
credentials.user("daniel","better-password")
credentials.user("marko","rainbow-dash")
Expand Down Expand Up @@ -2365,7 +2365,7 @@ included. The relevant configuration from the Gremlin Server initialization scri

[source,groovy]
----
globals << [g : traversal().withEmbedded(graph).withStrategies(ReferenceElementStrategy)]
globals << [g : traversal().with(graph).withStrategies(ReferenceElementStrategy)]
----

This configuration is global to Gremlin Server and therefore all methods of connection will always return elements
Expand All @@ -2382,7 +2382,7 @@ Cluster cluster = Cluster.open();
Client client = cluster.connect();
ResultSet results = client.submit("g.V().hasLabel('person').elementMap('name')");

GraphTraversalSource g = traversal().withRemote('conf/remote-graph.properties');
GraphTraversalSource g = traversal().with('conf/remote-graph.properties');
List<Vertex> results = g.V().hasLabel("person").elementMap('name').toList();
----

Expand Down
Loading
Loading