tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject [tinkerpop] branch TINKERPOP-2059 updated: omg, I did it
Date Fri, 02 Nov 2018 22:45:45 GMT
This is an automated email from the ASF dual-hosted git repository.

dkuppitz pushed a commit to branch TINKERPOP-2059
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2059 by this push:
     new 5e3aa0b  omg, I did it
5e3aa0b is described below

commit 5e3aa0b1dfa71041dcabb2eece06b633268847bd
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
AuthorDate: Fri Nov 2 15:45:39 2018 -0700

    omg, I did it
---
 docs/src/reference/gremlin-variants.asciidoc                   | 10 +++++-----
 .../apache/tinkerpop/gremlin/python/jsr223/SymbolHelper.java   |  1 +
 .../main/jython/gremlin_python/structure/io/graphsonV2d0.py    |  2 +-
 .../main/jython/gremlin_python/structure/io/graphsonV3d0.py    |  2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 172b349..4e4a86a 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -261,13 +261,13 @@ In order to add and remove <<traversalstrategy,traversal strategies>>
from a tra
 ----
 g = g.withStrategies(SubgraphStrategy(vertices=hasLabel('person'),edges=has('weight',gt(0.5))))
 g.V().name.toList()
-g.V().outE().valueMap().with(WithOptions.tokens).toList()
+g.V().outE().valueMap().with_(WithOptions.tokens).toList()
 g = g.withoutStrategies(SubgraphStrategy)
 g.V().name.toList()
-g.V().outE().valueMap().with(WithOptions.tokens).toList()
+g.V().outE().valueMap().with_(WithOptions.tokens).toList()
 g = g.withComputer(workers=2,vertices=has('name','marko'))
 g.V().name.toList()
-g.V().outE().valueMap().with(WithOptions.tokens).toList()
+g.V().outE().valueMap().with_(WithOptions.tokens).toList()
 ----
 
 NOTE: Many of the `TraversalStrategy` classes in Gremlin-Python are proxies to the respective
strategy on
@@ -424,14 +424,14 @@ var names = g.V().Values("name").ToList();  // names: [marko, vadas,
josh, peter
 g = g.WithoutStrategies(typeof(SubgraphStrategy));
 names = g.V().Values("name").ToList(); // names: [marko, vadas, lop, josh, ripple, peter]
 
-var edgeValueMaps = g.V().OutE().ValueMap().with(WithOptions.tokens).ToList();
+var edgeValueMaps = g.V().OutE().ValueMap().With(WithOptions.Tokens).ToList();
 // edgeValueMaps: [[label:created, id:9, weight:0.4], [label:knows, id:7, weight:0.5], [label:knows,
id:8, weight:1.0],
 //     [label:created, id:10, weight:1.0], [label:created, id:11, weight:0.4], [label:created,
id:12, weight:0.2]]
 
 g = g.WithComputer(workers: 2, vertices: Has("name", "marko"));
 names = g.V().Values("name").ToList();  // names: [marko]
 
-edgeValueMaps = g.V().OutE().ValueMap().with(WithOptions.tokens).ToList();
+edgeValueMaps = g.V().OutE().ValueMap().With(WithOptions.Tokens).ToList();
 // edgeValueMaps: [[label:created, id:9, weight:0.4], [label:knows, id:7, weight:0.5], [label:knows,
id:8, weight:1.0]]
 ----
 
diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/SymbolHelper.java
b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/SymbolHelper.java
index ce4ad7f..6a7564b 100644
--- a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/SymbolHelper.java
+++ b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/SymbolHelper.java
@@ -42,6 +42,7 @@ public final class SymbolHelper {
         TO_PYTHON_MAP.put("list", "list_");
         TO_PYTHON_MAP.put("set", "set_");
         TO_PYTHON_MAP.put("all", "all_");
+        TO_PYTHON_MAP.put("with", "with_");
         //
         TO_PYTHON_MAP.forEach((k, v) -> FROM_PYTHON_MAP.put(v, k));
     }
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV2d0.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV2d0.py
index cfb5171..3046f54 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV2d0.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV2d0.py
@@ -136,7 +136,7 @@ class _GraphSONTypeIO(object):
 
     symbolMap = {"global_": "global", "as_": "as", "in_": "in", "and_": "and",
                  "or_": "or", "is_": "is", "not_": "not", "from_": "from",
-                 "set_": "set", "list_": "list", "all_": "all"}
+                 "set_": "set", "list_": "list", "all_": "all", "with_": "with"}
 
     @classmethod
     def unmangleKeyword(cls, symbol):
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
index 5ff88d8..34b840e 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
@@ -138,7 +138,7 @@ class _GraphSONTypeIO(object):
 
     symbolMap = {"global_": "global", "as_": "as", "in_": "in", "and_": "and",
                  "or_": "or", "is_": "is", "not_": "not", "from_": "from",
-                 "set_": "set", "list_": "list", "all_": "all"}
+                 "set_": "set", "list_": "list", "all_": "all", "with_": "with"}
 
     @classmethod
     def unmangleKeyword(cls, symbol):


Mime
View raw message