gremlinpython 3.7.6__tar.gz → 3.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/MANIFEST.in +1 -1
- gremlinpython-3.8.0/NOTICE +5 -0
- {gremlinpython-3.7.6/gremlinpython.egg-info → gremlinpython-3.8.0}/PKG-INFO +3 -4
- gremlinpython-3.8.0/gremlin_python/__init__.py +21 -0
- gremlinpython-3.8.0/gremlin_python/__version__.py +20 -0
- {gremlinpython-3.7.6/gremlin_python/structure/io → gremlinpython-3.8.0/gremlin_python/driver}/__init__.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/aiohttp/__init__.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/aiohttp/transport.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/client.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/connection.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/driver_remote_connection.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/protocol.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/remote_connection.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/request.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/resultset.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/serializer.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/transport.py +3 -3
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/useragent.py +2 -2
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/__init__.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/anonymous_traversal.py +10 -13
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/graph_traversal.py +53 -32
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/strategies.py +39 -6
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/translator.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/process/traversal.py +45 -4
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/statics.py +40 -2
- {gremlinpython-3.7.6/gremlin_python/driver → gremlinpython-3.8.0/gremlin_python/structure}/__init__.py +3 -3
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/structure/graph.py +4 -16
- {gremlinpython-3.7.6/gremlin_python/structure → gremlinpython-3.8.0/gremlin_python/structure/io}/__init__.py +3 -3
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/structure/io/graphbinaryV1.py +49 -11
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/structure/io/graphsonV2d0.py +35 -29
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/structure/io/graphsonV3d0.py +35 -41
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/structure/io/util.py +1 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0/gremlinpython.egg-info}/PKG-INFO +3 -4
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlinpython.egg-info/SOURCES.txt +3 -1
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlinpython.egg-info/requires.txt +1 -2
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/pyproject.toml +4 -5
- gremlinpython-3.8.0/tests/test_statics.py +83 -0
- gremlinpython-3.7.6/NOTICE +0 -5
- gremlinpython-3.7.6/gremlin_python/__init__.py +0 -21
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/LICENSE +0 -0
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/README.rst +0 -0
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlinpython.egg-info/dependency_links.txt +0 -0
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlinpython.egg-info/top_level.txt +0 -0
- {gremlinpython-3.7.6 → gremlinpython-3.8.0}/setup.cfg +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# "License"); you may not use this file except in compliance
|
|
7
7
|
# with the License. You may obtain a copy of the License at
|
|
8
8
|
#
|
|
9
|
-
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
#
|
|
11
11
|
# Unless required by applicable law or agreed to in writing,
|
|
12
12
|
# software distributed under the License is distributed on an
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gremlinpython
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.0
|
|
4
4
|
Summary: Gremlin-Python for Apache TinkerPop
|
|
5
5
|
Maintainer-email: Apache TinkerPop <dev@tinkerpop.apache.org>
|
|
6
6
|
License: Apache 2
|
|
@@ -9,7 +9,7 @@ Classifier: Intended Audience :: Developers
|
|
|
9
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
10
|
Classifier: Natural Language :: English
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/x-rst
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
License-File: NOTICE
|
|
@@ -23,9 +23,8 @@ Requires-Dist: kerberos<2.0.0,>=1.3.0; extra == "kerberos"
|
|
|
23
23
|
Provides-Extra: ujson
|
|
24
24
|
Requires-Dist: ujson>=2.0.0; extra == "ujson"
|
|
25
25
|
Provides-Extra: test
|
|
26
|
-
Requires-Dist: pytest<
|
|
26
|
+
Requires-Dist: pytest<8.0.0,>=6.2.5; extra == "test"
|
|
27
27
|
Requires-Dist: radish-bdd==0.18.2; extra == "test"
|
|
28
|
-
Requires-Dist: lxml==5.3.0; extra == "test"
|
|
29
28
|
Requires-Dist: PyHamcrest<3.0.0,>=1.9.0; extra == "test"
|
|
30
29
|
Requires-Dist: PyYAML>=5.3; extra == "test"
|
|
31
30
|
Dynamic: license-file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
# or more contributor license agreements. See the NOTICE file
|
|
4
|
+
# distributed with this work for additional information
|
|
5
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
# to you under the Apache License, Version 2.0 (the
|
|
7
|
+
# "License"); you may not use this file except in compliance
|
|
8
|
+
# with the License. You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing,
|
|
13
|
+
# software distributed under the License is distributed on an
|
|
14
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
# KIND, either express or implied. See the License for the
|
|
16
|
+
# specific language governing permissions and limitations
|
|
17
|
+
# under the License.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
|
|
21
|
+
__version__ = '3.8.0'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
18
|
+
'''
|
|
19
|
+
version = '?'
|
|
20
|
+
timestamp = 1739570012
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# "License"); you may not use this file except in compliance
|
|
7
7
|
# with the License. You may obtain a copy of the License at
|
|
8
8
|
#
|
|
9
|
-
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
#
|
|
11
11
|
# Unless required by applicable law or agreed to in writing,
|
|
12
12
|
# software distributed under the License is distributed on an
|
{gremlinpython-3.7.6 → gremlinpython-3.8.0}/gremlin_python/driver/driver_remote_connection.py
RENAMED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
# to you under the Apache License, Version 2.0 (the
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
14
14
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#
|
|
19
19
|
import platform
|
|
20
20
|
|
|
21
|
-
gremlin_version = "3.
|
|
21
|
+
gremlin_version = "3.8.0" # DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
|
|
22
22
|
|
|
23
23
|
def _generate_user_agent():
|
|
24
24
|
application_name = "NotAvailable"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -36,25 +36,22 @@ class AnonymousTraversalSource(object):
|
|
|
36
36
|
def traversal(cls, traversal_source_class=GraphTraversalSource):
|
|
37
37
|
return AnonymousTraversalSource(traversal_source_class)
|
|
38
38
|
|
|
39
|
-
def
|
|
40
|
-
|
|
41
|
-
"gremlin_python.process.AnonymousTraversalSource.withGraph will be replaced by "
|
|
42
|
-
"gremlin_python.process.AnonymousTraversalSource.with_graph.",
|
|
43
|
-
DeprecationWarning)
|
|
44
|
-
return self.with_graph(graph)
|
|
45
|
-
|
|
46
|
-
def with_graph(self, graph):
|
|
47
|
-
return self.traversal_source_class(graph, TraversalStrategies.global_cache[graph.__class__])
|
|
39
|
+
def with_(self, remote_connection):
|
|
40
|
+
return self.traversal_source_class(Graph(), TraversalStrategies(), None, remote_connection)
|
|
48
41
|
|
|
49
42
|
def withRemote(self, remote_connection):
|
|
50
43
|
warnings.warn(
|
|
51
44
|
"gremlin_python.process.AnonymousTraversalSource.withRemote will be replaced by "
|
|
52
|
-
"gremlin_python.process.AnonymousTraversalSource.
|
|
45
|
+
"gremlin_python.process.AnonymousTraversalSource.with_.",
|
|
53
46
|
DeprecationWarning)
|
|
54
|
-
return self.
|
|
47
|
+
return self.with_(remote_connection)
|
|
55
48
|
|
|
56
49
|
def with_remote(self, remote_connection):
|
|
57
|
-
|
|
50
|
+
warnings.warn(
|
|
51
|
+
"gremlin_python.process.AnonymousTraversalSource.with_remote will be replaced by "
|
|
52
|
+
"gremlin_python.process.AnonymousTraversalSource.with_.",
|
|
53
|
+
DeprecationWarning)
|
|
54
|
+
return self.with_(remote_connection)
|
|
58
55
|
|
|
59
56
|
|
|
60
57
|
def traversal(traversal_source_class=GraphTraversalSource):
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -35,7 +35,7 @@ __author__ = 'Stephen Mallette (http://stephen.genoprime.com), Lyndon Bauto (lyn
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class GraphTraversalSource(object):
|
|
38
|
-
def __init__(self, graph, traversal_strategies, bytecode=None):
|
|
38
|
+
def __init__(self, graph, traversal_strategies, bytecode=None, remote_connection=None):
|
|
39
39
|
log.info("Creating GraphTraversalSource.")
|
|
40
40
|
self.graph = graph
|
|
41
41
|
self.traversal_strategies = traversal_strategies
|
|
@@ -43,7 +43,9 @@ class GraphTraversalSource(object):
|
|
|
43
43
|
bytecode = Bytecode()
|
|
44
44
|
self.bytecode = bytecode
|
|
45
45
|
self.graph_traversal = GraphTraversal
|
|
46
|
-
|
|
46
|
+
if remote_connection:
|
|
47
|
+
self.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
|
|
48
|
+
self.remote_connection = remote_connection
|
|
47
49
|
|
|
48
50
|
def __repr__(self):
|
|
49
51
|
return "graphtraversalsource[" + str(self.graph) + "]"
|
|
@@ -133,26 +135,13 @@ class GraphTraversalSource(object):
|
|
|
133
135
|
|
|
134
136
|
val = True if v is None else v
|
|
135
137
|
if options_strategy is None:
|
|
136
|
-
options_strategy = OptionsStrategy({k: val})
|
|
138
|
+
options_strategy = OptionsStrategy(**{k: val})
|
|
137
139
|
source = self.with_strategies(options_strategy)
|
|
138
140
|
else:
|
|
139
141
|
options_strategy[1].configuration[k] = val
|
|
140
142
|
|
|
141
143
|
return source
|
|
142
144
|
|
|
143
|
-
def withRemote(self, remote_connection):
|
|
144
|
-
warnings.warn(
|
|
145
|
-
"gremlin_python.process.GraphTraversalSource.withRemote will be replaced by "
|
|
146
|
-
"gremlin_python.process.GraphTraversalSource.with_remote.",
|
|
147
|
-
DeprecationWarning)
|
|
148
|
-
return self.with_remote(remote_connection)
|
|
149
|
-
|
|
150
|
-
def with_remote(self, remote_connection):
|
|
151
|
-
source = self.get_graph_traversal_source()
|
|
152
|
-
source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
|
|
153
|
-
self.remote_connection = remote_connection
|
|
154
|
-
return source
|
|
155
|
-
|
|
156
145
|
def tx(self):
|
|
157
146
|
# In order to keep the constructor unchanged within 3.5.x we can try to pop the RemoteConnection out of the
|
|
158
147
|
# TraversalStrategies. keeping this unchanged will allow user DSLs to not take a break.
|
|
@@ -325,10 +314,18 @@ class GraphTraversal(Traversal):
|
|
|
325
314
|
self.bytecode.add_step("as", *args)
|
|
326
315
|
return self
|
|
327
316
|
|
|
317
|
+
def as_bool(self, *args):
|
|
318
|
+
self.bytecode.add_step("asBool", *args)
|
|
319
|
+
return self
|
|
320
|
+
|
|
328
321
|
def as_date(self, *args):
|
|
329
322
|
self.bytecode.add_step("asDate", *args)
|
|
330
323
|
return self
|
|
331
324
|
|
|
325
|
+
def as_number(self, *args):
|
|
326
|
+
self.bytecode.add_step("asNumber", *args)
|
|
327
|
+
return self
|
|
328
|
+
|
|
332
329
|
def as_string(self, *args):
|
|
333
330
|
self.bytecode.add_step("asString", *args)
|
|
334
331
|
return self
|
|
@@ -449,6 +446,10 @@ class GraphTraversal(Traversal):
|
|
|
449
446
|
self.bytecode.add_step("difference", *args)
|
|
450
447
|
return self
|
|
451
448
|
|
|
449
|
+
def discard(self, *args):
|
|
450
|
+
self.bytecode.add_step("discard", *args)
|
|
451
|
+
return self
|
|
452
|
+
|
|
452
453
|
def disjunct(self, *args):
|
|
453
454
|
self.bytecode.add_step("disjunct", *args)
|
|
454
455
|
return self
|
|
@@ -555,6 +556,10 @@ class GraphTraversal(Traversal):
|
|
|
555
556
|
self.bytecode.add_step("hasKey", *args)
|
|
556
557
|
return self
|
|
557
558
|
|
|
559
|
+
def has_key(self, *args):
|
|
560
|
+
self.bytecode.add_step("hasKey", *args)
|
|
561
|
+
return self
|
|
562
|
+
|
|
558
563
|
def hasLabel(self, *args):
|
|
559
564
|
warnings.warn(
|
|
560
565
|
"gremlin_python.process.GraphTraversalSource.hasLabel will be replaced by "
|
|
@@ -909,10 +914,6 @@ class GraphTraversal(Traversal):
|
|
|
909
914
|
self.bytecode.add_step("split", *args)
|
|
910
915
|
return self
|
|
911
916
|
|
|
912
|
-
def store(self, *args):
|
|
913
|
-
self.bytecode.add_step("store", *args)
|
|
914
|
-
return self
|
|
915
|
-
|
|
916
917
|
def subgraph(self, *args):
|
|
917
918
|
self.bytecode.add_step("subgraph", *args)
|
|
918
919
|
return self
|
|
@@ -1102,10 +1103,18 @@ class __(object, metaclass=MagicType):
|
|
|
1102
1103
|
def as_(cls, *args):
|
|
1103
1104
|
return cls.graph_traversal(None, None, Bytecode()).as_(*args)
|
|
1104
1105
|
|
|
1106
|
+
@classmethod
|
|
1107
|
+
def as_bool(cls, *args):
|
|
1108
|
+
return cls.graph_traversal(None, None, Bytecode()).as_bool(*args)
|
|
1109
|
+
|
|
1105
1110
|
@classmethod
|
|
1106
1111
|
def as_date(cls, *args):
|
|
1107
1112
|
return cls.graph_traversal(None, None, Bytecode()).as_date(*args)
|
|
1108
1113
|
|
|
1114
|
+
@classmethod
|
|
1115
|
+
def as_number(cls, *args):
|
|
1116
|
+
return cls.graph_traversal(None, None, Bytecode()).as_number(*args)
|
|
1117
|
+
|
|
1109
1118
|
@classmethod
|
|
1110
1119
|
def as_string(cls, *args):
|
|
1111
1120
|
return cls.graph_traversal(None, None, Bytecode()).as_string(*args)
|
|
@@ -1214,6 +1223,10 @@ class __(object, metaclass=MagicType):
|
|
|
1214
1223
|
def difference(cls, *args):
|
|
1215
1224
|
return cls.graph_traversal(None, None, Bytecode()).difference(*args)
|
|
1216
1225
|
|
|
1226
|
+
@classmethod
|
|
1227
|
+
def discard(cls, *args):
|
|
1228
|
+
return cls.graph_traversal(None, None, Bytecode()).discard(*args)
|
|
1229
|
+
|
|
1217
1230
|
@classmethod
|
|
1218
1231
|
def disjunct(cls, *args):
|
|
1219
1232
|
return cls.graph_traversal(None, None, Bytecode()).disjunct(*args)
|
|
@@ -1441,7 +1454,7 @@ class __(object, metaclass=MagicType):
|
|
|
1441
1454
|
"gremlin_python.process.__.l_trim.",
|
|
1442
1455
|
DeprecationWarning)
|
|
1443
1456
|
return cls.l_trim(*args)
|
|
1444
|
-
|
|
1457
|
+
|
|
1445
1458
|
@classmethod
|
|
1446
1459
|
def l_trim(cls, *args):
|
|
1447
1460
|
return cls.graph_traversal(None, None, Bytecode()).l_trim(*args)
|
|
@@ -1646,10 +1659,6 @@ class __(object, metaclass=MagicType):
|
|
|
1646
1659
|
def split(cls, *args):
|
|
1647
1660
|
return cls.graph_traversal(None, None, Bytecode()).split(*args)
|
|
1648
1661
|
|
|
1649
|
-
@classmethod
|
|
1650
|
-
def store(cls, *args):
|
|
1651
|
-
return cls.graph_traversal(None, None, Bytecode()).store(*args)
|
|
1652
|
-
|
|
1653
1662
|
@classmethod
|
|
1654
1663
|
def subgraph(cls, *args):
|
|
1655
1664
|
return cls.graph_traversal(None, None, Bytecode()).subgraph(*args)
|
|
@@ -1882,10 +1891,18 @@ def as_(*args):
|
|
|
1882
1891
|
return __.as_(*args)
|
|
1883
1892
|
|
|
1884
1893
|
|
|
1894
|
+
def as_bool(*args):
|
|
1895
|
+
return __.as_bool(*args)
|
|
1896
|
+
|
|
1897
|
+
|
|
1885
1898
|
def as_date(*args):
|
|
1886
1899
|
return __.as_date(*args)
|
|
1887
1900
|
|
|
1888
1901
|
|
|
1902
|
+
def as_number(*args):
|
|
1903
|
+
return __.as_number(*args)
|
|
1904
|
+
|
|
1905
|
+
|
|
1889
1906
|
def as_string(*args):
|
|
1890
1907
|
return __.as_string(*args)
|
|
1891
1908
|
|
|
@@ -1982,6 +1999,10 @@ def difference(*args):
|
|
|
1982
1999
|
return __.difference(*args)
|
|
1983
2000
|
|
|
1984
2001
|
|
|
2002
|
+
def discard(*args):
|
|
2003
|
+
return __.discard(*args)
|
|
2004
|
+
|
|
2005
|
+
|
|
1985
2006
|
def disjunct(*args):
|
|
1986
2007
|
return __.disjunct(*args)
|
|
1987
2008
|
|
|
@@ -2336,10 +2357,6 @@ def split(*args):
|
|
|
2336
2357
|
return __.split(*args)
|
|
2337
2358
|
|
|
2338
2359
|
|
|
2339
|
-
def store(*args):
|
|
2340
|
-
return __.store(*args)
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
2360
|
def subgraph(*args):
|
|
2344
2361
|
return __.subgraph(*args)
|
|
2345
2362
|
|
|
@@ -2457,8 +2474,12 @@ statics.add_static('any_', any_)
|
|
|
2457
2474
|
|
|
2458
2475
|
statics.add_static('as_', as_)
|
|
2459
2476
|
|
|
2477
|
+
statics.add_static('as_bool', as_bool)
|
|
2478
|
+
|
|
2460
2479
|
statics.add_static('as_date', as_date)
|
|
2461
2480
|
|
|
2481
|
+
statics.add_static('as_number', as_number)
|
|
2482
|
+
|
|
2462
2483
|
statics.add_static('as_string', as_string)
|
|
2463
2484
|
|
|
2464
2485
|
statics.add_static('barrier', barrier)
|
|
@@ -2507,6 +2528,8 @@ statics.add_static('dedup', dedup)
|
|
|
2507
2528
|
|
|
2508
2529
|
statics.add_static('difference', difference)
|
|
2509
2530
|
|
|
2531
|
+
statics.add_static('discard', discard)
|
|
2532
|
+
|
|
2510
2533
|
statics.add_static('disjunct', disjunct)
|
|
2511
2534
|
|
|
2512
2535
|
statics.add_static('drop', drop)
|
|
@@ -2681,8 +2704,6 @@ statics.add_static('skip', skip)
|
|
|
2681
2704
|
|
|
2682
2705
|
statics.add_static('split', split)
|
|
2683
2706
|
|
|
2684
|
-
statics.add_static('store', store)
|
|
2685
|
-
|
|
2686
2707
|
statics.add_static('subgraph', subgraph)
|
|
2687
2708
|
|
|
2688
2709
|
statics.add_static('substring', substring)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
|
|
21
21
|
|
|
22
|
-
from
|
|
22
|
+
from .traversal import TraversalStrategy
|
|
23
23
|
|
|
24
24
|
base_namespace = 'org.apache.tinkerpop.gremlin.process.traversal.strategy.'
|
|
25
25
|
decoration_namespace = base_namespace + 'decoration.'
|
|
@@ -41,6 +41,7 @@ class ConnectiveStrategy(TraversalStrategy):
|
|
|
41
41
|
class ElementIdStrategy(TraversalStrategy):
|
|
42
42
|
def __init__(self):
|
|
43
43
|
TraversalStrategy.__init__(self, fqcn=decoration_namespace + 'ElementIdStrategy')
|
|
44
|
+
self.configuration = {}
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
# EventStrategy doesn't make sense outside JVM traversal machine
|
|
@@ -53,7 +54,7 @@ class HaltedTraverserStrategy(TraversalStrategy):
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
class OptionsStrategy(TraversalStrategy):
|
|
56
|
-
def __init__(self, options
|
|
57
|
+
def __init__(self, **options):
|
|
57
58
|
TraversalStrategy.__init__(self, configuration=options, fqcn=decoration_namespace + 'OptionsStrategy')
|
|
58
59
|
|
|
59
60
|
|
|
@@ -87,7 +88,7 @@ class SubgraphStrategy(TraversalStrategy):
|
|
|
87
88
|
if vertex_properties is not None:
|
|
88
89
|
self.configuration["vertexProperties"] = vertex_properties
|
|
89
90
|
if check_adjacent_vertices is not None:
|
|
90
|
-
self.configuration["
|
|
91
|
+
self.configuration["checkAdjacentVertices"] = check_adjacent_vertices
|
|
91
92
|
|
|
92
93
|
|
|
93
94
|
class VertexProgramStrategy(TraversalStrategy):
|
|
@@ -109,6 +110,19 @@ class VertexProgramStrategy(TraversalStrategy):
|
|
|
109
110
|
if configuration is not None:
|
|
110
111
|
self.configuration.update(configuration)
|
|
111
112
|
|
|
113
|
+
class ReferenceElementStrategy(TraversalStrategy):
|
|
114
|
+
def __init__(self, options=None):
|
|
115
|
+
TraversalStrategy.__init__(self, configuration=options, fqcn=decoration_namespace + 'ReferenceElementStrategy')
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class ComputerFinalizationStrategy(TraversalStrategy):
|
|
119
|
+
def __init__(self, options=None):
|
|
120
|
+
TraversalStrategy.__init__(self, configuration=options, fqcn=decoration_namespace + 'ComputerFinalizationStrategy')
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class ProfileStrategy(TraversalStrategy):
|
|
124
|
+
def __init__(self, options=None):
|
|
125
|
+
TraversalStrategy.__init__(self, configuration=options, fqcn=decoration_namespace + 'ProfileStrategy')
|
|
112
126
|
|
|
113
127
|
###########################
|
|
114
128
|
# FINALIZATION STRATEGIES #
|
|
@@ -132,12 +146,12 @@ class AdjacentToIncidentStrategy(TraversalStrategy):
|
|
|
132
146
|
|
|
133
147
|
class ByModulatorOptimizationStrategy(TraversalStrategy):
|
|
134
148
|
def __init__(self):
|
|
135
|
-
TraversalStrategy.__init__(self, fqcn=
|
|
149
|
+
TraversalStrategy.__init__(self, fqcn=optimization_namespace + 'ByModulatorOptimizationStrategy')
|
|
136
150
|
|
|
137
151
|
|
|
138
152
|
class CountStrategy(TraversalStrategy):
|
|
139
153
|
def __init__(self):
|
|
140
|
-
TraversalStrategy.__init__(self, fqcn=
|
|
154
|
+
TraversalStrategy.__init__(self, fqcn=optimization_namespace + 'CountStrategy')
|
|
141
155
|
|
|
142
156
|
|
|
143
157
|
class FilterRankingStrategy(TraversalStrategy):
|
|
@@ -210,10 +224,19 @@ class EarlyLimitStrategy(TraversalStrategy):
|
|
|
210
224
|
def __init__(self):
|
|
211
225
|
TraversalStrategy.__init__(self, fqcn=optimization_namespace + 'EarlyLimitStrategy')
|
|
212
226
|
|
|
227
|
+
|
|
228
|
+
class MessagePassingReductionStrategy(TraversalStrategy):
|
|
229
|
+
def __init__(self, options=None):
|
|
230
|
+
TraversalStrategy.__init__(self, configuration=options, fqcn=optimization_namespace + 'MessagePassingReductionStrategy')
|
|
231
|
+
|
|
213
232
|
###########################
|
|
214
233
|
# VERIFICATION STRATEGIES #
|
|
215
234
|
###########################
|
|
216
235
|
|
|
236
|
+
class ComputerVerificationStrategy(TraversalStrategy):
|
|
237
|
+
def __init__(self, options=None):
|
|
238
|
+
TraversalStrategy.__init__(self, configuration=options, fqcn=verification_namespace + 'ComputerVerificationStrategy')
|
|
239
|
+
|
|
217
240
|
|
|
218
241
|
class LambdaRestrictionStrategy(TraversalStrategy):
|
|
219
242
|
def __init__(self):
|
|
@@ -237,3 +260,13 @@ class ReservedKeysVerificationStrategy(TraversalStrategy):
|
|
|
237
260
|
self.configuration["logWarning"] = log_warning
|
|
238
261
|
self.configuration["throwException"] = throw_exception
|
|
239
262
|
self.configuration["keys"] = keys
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class VertexProgramRestrictionStrategy(TraversalStrategy):
|
|
266
|
+
def __init__(self):
|
|
267
|
+
TraversalStrategy.__init__(self, fqcn=verification_namespace + 'VertexProgramRestrictionStrategy')
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class StandardVerificationStrategy(TraversalStrategy):
|
|
271
|
+
def __init__(self):
|
|
272
|
+
TraversalStrategy.__init__(self, fqcn=verification_namespace + 'StandardVerificationStrategy')
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# "License"); you may not use this file except in compliance
|
|
8
8
|
# with the License. You may obtain a copy of the License at
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
#
|
|
12
12
|
# Unless required by applicable law or agreed to in writing,
|
|
13
13
|
# software distributed under the License is distributed on an
|