gremlinpython 3.6.8__py3-none-any.whl → 3.7.3__py3-none-any.whl
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.
- gremlin_python/__version__.py +2 -2
- gremlin_python/driver/driver_remote_connection.py +1 -1
- gremlin_python/driver/useragent.py +1 -1
- gremlin_python/process/graph_traversal.py +350 -1
- gremlin_python/process/traversal.py +25 -0
- gremlin_python/structure/graph.py +8 -7
- gremlin_python/structure/io/graphbinaryV1.py +22 -6
- gremlin_python/structure/io/graphsonV2d0.py +20 -3
- gremlin_python/structure/io/graphsonV3d0.py +20 -3
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/METADATA +1 -1
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/RECORD +17 -17
- {gremlinpython-3.6.8.data → gremlinpython-3.7.3.data}/data/LICENSE +0 -0
- {gremlinpython-3.6.8.data → gremlinpython-3.7.3.data}/data/NOTICE +0 -0
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/LICENSE +0 -0
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/NOTICE +0 -0
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/WHEEL +0 -0
- {gremlinpython-3.6.8.dist-info → gremlinpython-3.7.3.dist-info}/top_level.txt +0 -0
gremlin_python/__version__.py
CHANGED
|
@@ -177,7 +177,7 @@ class DriverRemoteConnection(RemoteConnection):
|
|
|
177
177
|
if x[0] == "withStrategies" and type(x[1]) is OptionsStrategy), None)
|
|
178
178
|
request_options = None
|
|
179
179
|
if options_strategy:
|
|
180
|
-
allowed_keys = ['evaluationTimeout', 'scriptEvaluationTimeout', 'batchSize', 'requestId', 'userAgent']
|
|
180
|
+
allowed_keys = ['evaluationTimeout', 'scriptEvaluationTimeout', 'batchSize', 'requestId', 'userAgent', 'materializeProperties']
|
|
181
181
|
request_options = {allowed: options_strategy[1].configuration[allowed] for allowed in allowed_keys
|
|
182
182
|
if allowed in options_strategy[1].configuration}
|
|
183
183
|
return request_options
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#
|
|
19
19
|
import platform
|
|
20
20
|
|
|
21
|
-
gremlin_version = "3.
|
|
21
|
+
gremlin_version = "3.7.3" # DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
|
|
22
22
|
|
|
23
23
|
def _generate_user_agent():
|
|
24
24
|
application_name = "NotAvailable"
|
|
@@ -180,7 +180,7 @@ class GraphTraversalSource(object):
|
|
|
180
180
|
return self.with_computer(graph_computer, workers, result, persist, vertices, edges, configuration)
|
|
181
181
|
|
|
182
182
|
def with_computer(self, graph_computer=None, workers=None, result=None, persist=None, vertices=None,
|
|
183
|
-
|
|
183
|
+
edges=None, configuration=None):
|
|
184
184
|
return self.with_strategies(
|
|
185
185
|
VertexProgramStrategy(graph_computer, workers, result, persist, vertices, edges, configuration))
|
|
186
186
|
|
|
@@ -243,6 +243,11 @@ class GraphTraversalSource(object):
|
|
|
243
243
|
traversal.bytecode.add_step("call", *args)
|
|
244
244
|
return traversal
|
|
245
245
|
|
|
246
|
+
def union(self, *args):
|
|
247
|
+
traversal = self.get_graph_traversal()
|
|
248
|
+
traversal.bytecode.add_step("union", *args)
|
|
249
|
+
return traversal
|
|
250
|
+
|
|
246
251
|
|
|
247
252
|
class GraphTraversal(Traversal):
|
|
248
253
|
def __init__(self, graph, traversal_strategies, bytecode):
|
|
@@ -274,6 +279,10 @@ class GraphTraversal(Traversal):
|
|
|
274
279
|
self.bytecode.add_step("V", *args)
|
|
275
280
|
return self
|
|
276
281
|
|
|
282
|
+
def E(self, *args):
|
|
283
|
+
self.bytecode.add_step("E", *args)
|
|
284
|
+
return self
|
|
285
|
+
|
|
277
286
|
def addE(self, *args):
|
|
278
287
|
warnings.warn(
|
|
279
288
|
"gremlin_python.process.GraphTraversal.addE will be replaced by "
|
|
@@ -300,14 +309,30 @@ class GraphTraversal(Traversal):
|
|
|
300
309
|
self.bytecode.add_step("aggregate", *args)
|
|
301
310
|
return self
|
|
302
311
|
|
|
312
|
+
def all_(self, *args):
|
|
313
|
+
self.bytecode.add_step("all", *args)
|
|
314
|
+
return self
|
|
315
|
+
|
|
303
316
|
def and_(self, *args):
|
|
304
317
|
self.bytecode.add_step("and", *args)
|
|
305
318
|
return self
|
|
306
319
|
|
|
320
|
+
def any_(self, *args):
|
|
321
|
+
self.bytecode.add_step("any", *args)
|
|
322
|
+
return self
|
|
323
|
+
|
|
307
324
|
def as_(self, *args):
|
|
308
325
|
self.bytecode.add_step("as", *args)
|
|
309
326
|
return self
|
|
310
327
|
|
|
328
|
+
def as_date(self, *args):
|
|
329
|
+
self.bytecode.add_step("asDate", *args)
|
|
330
|
+
return self
|
|
331
|
+
|
|
332
|
+
def as_string(self, *args):
|
|
333
|
+
self.bytecode.add_step("asString", *args)
|
|
334
|
+
return self
|
|
335
|
+
|
|
311
336
|
def barrier(self, *args):
|
|
312
337
|
self.bytecode.add_step("barrier", *args)
|
|
313
338
|
return self
|
|
@@ -366,6 +391,18 @@ class GraphTraversal(Traversal):
|
|
|
366
391
|
self.bytecode.add_step("coin", *args)
|
|
367
392
|
return self
|
|
368
393
|
|
|
394
|
+
def combine(self, *args):
|
|
395
|
+
self.bytecode.add_step("combine", *args)
|
|
396
|
+
return self
|
|
397
|
+
|
|
398
|
+
def concat(self, *args):
|
|
399
|
+
self.bytecode.add_step("concat", *args)
|
|
400
|
+
return self
|
|
401
|
+
|
|
402
|
+
def conjoin(self, *args):
|
|
403
|
+
self.bytecode.add_step("conjoin", *args)
|
|
404
|
+
return self
|
|
405
|
+
|
|
369
406
|
def connectedComponent(self, *args):
|
|
370
407
|
warnings.warn(
|
|
371
408
|
"gremlin_python.process.GraphTraversalSource.connectedComponent will be replaced by "
|
|
@@ -396,10 +433,26 @@ class GraphTraversal(Traversal):
|
|
|
396
433
|
self.bytecode.add_step("cyclicPath", *args)
|
|
397
434
|
return self
|
|
398
435
|
|
|
436
|
+
def date_add(self, *args):
|
|
437
|
+
self.bytecode.add_step("dateAdd", *args)
|
|
438
|
+
return self
|
|
439
|
+
|
|
440
|
+
def date_diff(self, *args):
|
|
441
|
+
self.bytecode.add_step("dateDiff", *args)
|
|
442
|
+
return self
|
|
443
|
+
|
|
399
444
|
def dedup(self, *args):
|
|
400
445
|
self.bytecode.add_step("dedup", *args)
|
|
401
446
|
return self
|
|
402
447
|
|
|
448
|
+
def difference(self, *args):
|
|
449
|
+
self.bytecode.add_step("difference", *args)
|
|
450
|
+
return self
|
|
451
|
+
|
|
452
|
+
def disjunct(self, *args):
|
|
453
|
+
self.bytecode.add_step("disjunct", *args)
|
|
454
|
+
return self
|
|
455
|
+
|
|
403
456
|
def drop(self, *args):
|
|
404
457
|
self.bytecode.add_step("drop", *args)
|
|
405
458
|
return self
|
|
@@ -446,6 +499,10 @@ class GraphTraversal(Traversal):
|
|
|
446
499
|
self.bytecode.add_step("fold", *args)
|
|
447
500
|
return self
|
|
448
501
|
|
|
502
|
+
def format_(self, *args):
|
|
503
|
+
self.bytecode.add_step("format", *args)
|
|
504
|
+
return self
|
|
505
|
+
|
|
449
506
|
def from_(self, *args):
|
|
450
507
|
self.bytecode.add_step("from", *args)
|
|
451
508
|
return self
|
|
@@ -566,6 +623,10 @@ class GraphTraversal(Traversal):
|
|
|
566
623
|
self.bytecode.add_step("inject", *args)
|
|
567
624
|
return self
|
|
568
625
|
|
|
626
|
+
def intersect(self, *args):
|
|
627
|
+
self.bytecode.add_step("intersect", *args)
|
|
628
|
+
return self
|
|
629
|
+
|
|
569
630
|
def is_(self, *args):
|
|
570
631
|
self.bytecode.add_step("is", *args)
|
|
571
632
|
return self
|
|
@@ -578,6 +639,10 @@ class GraphTraversal(Traversal):
|
|
|
578
639
|
self.bytecode.add_step("label", *args)
|
|
579
640
|
return self
|
|
580
641
|
|
|
642
|
+
def length(self, *args):
|
|
643
|
+
self.bytecode.add_step("length", *args)
|
|
644
|
+
return self
|
|
645
|
+
|
|
581
646
|
def limit(self, *args):
|
|
582
647
|
self.bytecode.add_step("limit", *args)
|
|
583
648
|
return self
|
|
@@ -590,6 +655,14 @@ class GraphTraversal(Traversal):
|
|
|
590
655
|
self.bytecode.add_step("loops", *args)
|
|
591
656
|
return self
|
|
592
657
|
|
|
658
|
+
def lTrim(self, *args):
|
|
659
|
+
self.bytecode.add_step("lTrim", *args)
|
|
660
|
+
return self
|
|
661
|
+
|
|
662
|
+
def l_trim(self, *args):
|
|
663
|
+
self.bytecode.add_step("lTrim", *args)
|
|
664
|
+
return self
|
|
665
|
+
|
|
593
666
|
def map(self, *args):
|
|
594
667
|
self.bytecode.add_step("map", *args)
|
|
595
668
|
return self
|
|
@@ -610,6 +683,10 @@ class GraphTraversal(Traversal):
|
|
|
610
683
|
self.bytecode.add_step("mean", *args)
|
|
611
684
|
return self
|
|
612
685
|
|
|
686
|
+
def merge(self, *args):
|
|
687
|
+
self.bytecode.add_step("merge", *args)
|
|
688
|
+
return self
|
|
689
|
+
|
|
613
690
|
def merge_e(self, *args):
|
|
614
691
|
self.bytecode.add_step("mergeE", *args)
|
|
615
692
|
return self
|
|
@@ -709,6 +786,10 @@ class GraphTraversal(Traversal):
|
|
|
709
786
|
self.bytecode.add_step("peerPressure", *args)
|
|
710
787
|
return self
|
|
711
788
|
|
|
789
|
+
def product(self, *args):
|
|
790
|
+
self.bytecode.add_step("product", *args)
|
|
791
|
+
return self
|
|
792
|
+
|
|
712
793
|
def profile(self, *args):
|
|
713
794
|
self.bytecode.add_step("profile", *args)
|
|
714
795
|
return self
|
|
@@ -752,6 +833,22 @@ class GraphTraversal(Traversal):
|
|
|
752
833
|
self.bytecode.add_step("repeat", *args)
|
|
753
834
|
return self
|
|
754
835
|
|
|
836
|
+
def replace(self, *args):
|
|
837
|
+
self.bytecode.add_step("replace", *args)
|
|
838
|
+
return self
|
|
839
|
+
|
|
840
|
+
def reverse(self, *args):
|
|
841
|
+
self.bytecode.add_step("reverse", *args)
|
|
842
|
+
return self
|
|
843
|
+
|
|
844
|
+
def rTrim(self, *args):
|
|
845
|
+
self.bytecode.add_step("rTrim", *args)
|
|
846
|
+
return self
|
|
847
|
+
|
|
848
|
+
def r_trim(self, *args):
|
|
849
|
+
self.bytecode.add_step("rTrim", *args)
|
|
850
|
+
return self
|
|
851
|
+
|
|
755
852
|
def sack(self, *args):
|
|
756
853
|
self.bytecode.add_step("sack", *args)
|
|
757
854
|
return self
|
|
@@ -801,6 +898,10 @@ class GraphTraversal(Traversal):
|
|
|
801
898
|
self.bytecode.add_step("skip", *args)
|
|
802
899
|
return self
|
|
803
900
|
|
|
901
|
+
def split(self, *args):
|
|
902
|
+
self.bytecode.add_step("split", *args)
|
|
903
|
+
return self
|
|
904
|
+
|
|
804
905
|
def store(self, *args):
|
|
805
906
|
self.bytecode.add_step("store", *args)
|
|
806
907
|
return self
|
|
@@ -809,6 +910,10 @@ class GraphTraversal(Traversal):
|
|
|
809
910
|
self.bytecode.add_step("subgraph", *args)
|
|
810
911
|
return self
|
|
811
912
|
|
|
913
|
+
def substring(self, *args):
|
|
914
|
+
self.bytecode.add_step("substring", *args)
|
|
915
|
+
return self
|
|
916
|
+
|
|
812
917
|
def sum_(self, *args):
|
|
813
918
|
self.bytecode.add_step("sum", *args)
|
|
814
919
|
return self
|
|
@@ -847,6 +952,14 @@ class GraphTraversal(Traversal):
|
|
|
847
952
|
self.bytecode.add_step("toE", *args)
|
|
848
953
|
return self
|
|
849
954
|
|
|
955
|
+
def to_lower(self, *args):
|
|
956
|
+
self.bytecode.add_step("toLower", *args)
|
|
957
|
+
return self
|
|
958
|
+
|
|
959
|
+
def to_upper(self, *args):
|
|
960
|
+
self.bytecode.add_step("toUpper", *args)
|
|
961
|
+
return self
|
|
962
|
+
|
|
850
963
|
def toV(self, *args):
|
|
851
964
|
warnings.warn(
|
|
852
965
|
"gremlin_python.process.GraphTraversalSource.toV will be replaced by "
|
|
@@ -862,6 +975,10 @@ class GraphTraversal(Traversal):
|
|
|
862
975
|
self.bytecode.add_step("tree", *args)
|
|
863
976
|
return self
|
|
864
977
|
|
|
978
|
+
def trim(self, *args):
|
|
979
|
+
self.bytecode.add_step("trim", *args)
|
|
980
|
+
return self
|
|
981
|
+
|
|
865
982
|
def unfold(self, *args):
|
|
866
983
|
self.bytecode.add_step("unfold", *args)
|
|
867
984
|
return self
|
|
@@ -926,6 +1043,10 @@ class __(object, metaclass=MagicType):
|
|
|
926
1043
|
def __(cls, *args):
|
|
927
1044
|
return __.inject(*args)
|
|
928
1045
|
|
|
1046
|
+
@classmethod
|
|
1047
|
+
def E(cls, *args):
|
|
1048
|
+
return cls.graph_traversal(None, None, Bytecode()).E(*args)
|
|
1049
|
+
|
|
929
1050
|
@classmethod
|
|
930
1051
|
def V(cls, *args):
|
|
931
1052
|
return cls.graph_traversal(None, None, Bytecode()).V(*args)
|
|
@@ -958,14 +1079,30 @@ class __(object, metaclass=MagicType):
|
|
|
958
1079
|
def aggregate(cls, *args):
|
|
959
1080
|
return cls.graph_traversal(None, None, Bytecode()).aggregate(*args)
|
|
960
1081
|
|
|
1082
|
+
@classmethod
|
|
1083
|
+
def all_(cls, *args):
|
|
1084
|
+
return cls.graph_traversal(None, None, Bytecode()).all_(*args)
|
|
1085
|
+
|
|
961
1086
|
@classmethod
|
|
962
1087
|
def and_(cls, *args):
|
|
963
1088
|
return cls.graph_traversal(None, None, Bytecode()).and_(*args)
|
|
964
1089
|
|
|
1090
|
+
@classmethod
|
|
1091
|
+
def any_(cls, *args):
|
|
1092
|
+
return cls.graph_traversal(None, None, Bytecode()).any_(*args)
|
|
1093
|
+
|
|
965
1094
|
@classmethod
|
|
966
1095
|
def as_(cls, *args):
|
|
967
1096
|
return cls.graph_traversal(None, None, Bytecode()).as_(*args)
|
|
968
1097
|
|
|
1098
|
+
@classmethod
|
|
1099
|
+
def as_date(cls, *args):
|
|
1100
|
+
return cls.graph_traversal(None, None, Bytecode()).as_date(*args)
|
|
1101
|
+
|
|
1102
|
+
@classmethod
|
|
1103
|
+
def as_string(cls, *args):
|
|
1104
|
+
return cls.graph_traversal(None, None, Bytecode()).as_string(*args)
|
|
1105
|
+
|
|
969
1106
|
@classmethod
|
|
970
1107
|
def barrier(cls, *args):
|
|
971
1108
|
return cls.graph_traversal(None, None, Bytecode()).barrier(*args)
|
|
@@ -1022,6 +1159,18 @@ class __(object, metaclass=MagicType):
|
|
|
1022
1159
|
def coin(cls, *args):
|
|
1023
1160
|
return cls.graph_traversal(None, None, Bytecode()).coin(*args)
|
|
1024
1161
|
|
|
1162
|
+
@classmethod
|
|
1163
|
+
def combine(cls, *args):
|
|
1164
|
+
return cls.graph_traversal(None, None, Bytecode()).combine(*args)
|
|
1165
|
+
|
|
1166
|
+
@classmethod
|
|
1167
|
+
def concat(cls, *args):
|
|
1168
|
+
return cls.graph_traversal(None, None, Bytecode()).concat(*args)
|
|
1169
|
+
|
|
1170
|
+
@classmethod
|
|
1171
|
+
def conjoin(cls, *args):
|
|
1172
|
+
return cls.graph_traversal(None, None, Bytecode()).conjoin(*args)
|
|
1173
|
+
|
|
1025
1174
|
@classmethod
|
|
1026
1175
|
def constant(cls, *args):
|
|
1027
1176
|
return cls.graph_traversal(None, None, Bytecode()).constant(*args)
|
|
@@ -1042,10 +1191,26 @@ class __(object, metaclass=MagicType):
|
|
|
1042
1191
|
def cyclic_path(cls, *args):
|
|
1043
1192
|
return cls.graph_traversal(None, None, Bytecode()).cyclic_path(*args)
|
|
1044
1193
|
|
|
1194
|
+
@classmethod
|
|
1195
|
+
def date_add(cls, *args):
|
|
1196
|
+
return cls.graph_traversal(None, None, Bytecode()).date_add(*args)
|
|
1197
|
+
|
|
1198
|
+
@classmethod
|
|
1199
|
+
def date_diff(cls, *args):
|
|
1200
|
+
return cls.graph_traversal(None, None, Bytecode()).date_diff(*args)
|
|
1201
|
+
|
|
1045
1202
|
@classmethod
|
|
1046
1203
|
def dedup(cls, *args):
|
|
1047
1204
|
return cls.graph_traversal(None, None, Bytecode()).dedup(*args)
|
|
1048
1205
|
|
|
1206
|
+
@classmethod
|
|
1207
|
+
def difference(cls, *args):
|
|
1208
|
+
return cls.graph_traversal(None, None, Bytecode()).difference(*args)
|
|
1209
|
+
|
|
1210
|
+
@classmethod
|
|
1211
|
+
def disjunct(cls, *args):
|
|
1212
|
+
return cls.graph_traversal(None, None, Bytecode()).disjunct(*args)
|
|
1213
|
+
|
|
1049
1214
|
@classmethod
|
|
1050
1215
|
def drop(cls, *args):
|
|
1051
1216
|
return cls.graph_traversal(None, None, Bytecode()).drop(*args)
|
|
@@ -1094,6 +1259,10 @@ class __(object, metaclass=MagicType):
|
|
|
1094
1259
|
def fold(cls, *args):
|
|
1095
1260
|
return cls.graph_traversal(None, None, Bytecode()).fold(*args)
|
|
1096
1261
|
|
|
1262
|
+
@classmethod
|
|
1263
|
+
def format_(cls, *args):
|
|
1264
|
+
return cls.graph_traversal(None, None, Bytecode()).format_(*args)
|
|
1265
|
+
|
|
1097
1266
|
@classmethod
|
|
1098
1267
|
def group(cls, *args):
|
|
1099
1268
|
return cls.graph_traversal(None, None, Bytecode()).group(*args)
|
|
@@ -1218,6 +1387,10 @@ class __(object, metaclass=MagicType):
|
|
|
1218
1387
|
def inject(cls, *args):
|
|
1219
1388
|
return cls.graph_traversal(None, None, Bytecode()).inject(*args)
|
|
1220
1389
|
|
|
1390
|
+
@classmethod
|
|
1391
|
+
def intersect(cls, *args):
|
|
1392
|
+
return cls.graph_traversal(None, None, Bytecode()).intersect(*args)
|
|
1393
|
+
|
|
1221
1394
|
@classmethod
|
|
1222
1395
|
def is_(cls, *args):
|
|
1223
1396
|
return cls.graph_traversal(None, None, Bytecode()).is_(*args)
|
|
@@ -1230,6 +1403,10 @@ class __(object, metaclass=MagicType):
|
|
|
1230
1403
|
def label(cls, *args):
|
|
1231
1404
|
return cls.graph_traversal(None, None, Bytecode()).label(*args)
|
|
1232
1405
|
|
|
1406
|
+
@classmethod
|
|
1407
|
+
def length(cls, *args):
|
|
1408
|
+
return cls.graph_traversal(None, None, Bytecode()).length(*args)
|
|
1409
|
+
|
|
1233
1410
|
@classmethod
|
|
1234
1411
|
def limit(cls, *args):
|
|
1235
1412
|
return cls.graph_traversal(None, None, Bytecode()).limit(*args)
|
|
@@ -1242,6 +1419,18 @@ class __(object, metaclass=MagicType):
|
|
|
1242
1419
|
def loops(cls, *args):
|
|
1243
1420
|
return cls.graph_traversal(None, None, Bytecode()).loops(*args)
|
|
1244
1421
|
|
|
1422
|
+
@classmethod
|
|
1423
|
+
def ltrim(cls, *args):
|
|
1424
|
+
warnings.warn(
|
|
1425
|
+
"gremlin_python.process.__.ltrim will be replaced by "
|
|
1426
|
+
"gremlin_python.process.__.l_trim.",
|
|
1427
|
+
DeprecationWarning)
|
|
1428
|
+
return cls.l_trim(*args)
|
|
1429
|
+
|
|
1430
|
+
@classmethod
|
|
1431
|
+
def l_trim(cls, *args):
|
|
1432
|
+
return cls.graph_traversal(None, None, Bytecode()).l_trim(*args)
|
|
1433
|
+
|
|
1245
1434
|
@classmethod
|
|
1246
1435
|
def map(cls, *args):
|
|
1247
1436
|
return cls.graph_traversal(None, None, Bytecode()).map(*args)
|
|
@@ -1262,6 +1451,10 @@ class __(object, metaclass=MagicType):
|
|
|
1262
1451
|
def mean(cls, *args):
|
|
1263
1452
|
return cls.graph_traversal(None, None, Bytecode()).mean(*args)
|
|
1264
1453
|
|
|
1454
|
+
@classmethod
|
|
1455
|
+
def merge(cls, *args):
|
|
1456
|
+
return cls.graph_traversal(None, None, Bytecode()).merge(*args)
|
|
1457
|
+
|
|
1265
1458
|
@classmethod
|
|
1266
1459
|
def merge_e(cls, *args):
|
|
1267
1460
|
return cls.graph_traversal(None, None, Bytecode()).merge_e(*args)
|
|
@@ -1334,6 +1527,10 @@ class __(object, metaclass=MagicType):
|
|
|
1334
1527
|
def path(cls, *args):
|
|
1335
1528
|
return cls.graph_traversal(None, None, Bytecode()).path(*args)
|
|
1336
1529
|
|
|
1530
|
+
@classmethod
|
|
1531
|
+
def product(cls, *args):
|
|
1532
|
+
return cls.graph_traversal(None, None, Bytecode()).product(*args)
|
|
1533
|
+
|
|
1337
1534
|
@classmethod
|
|
1338
1535
|
def project(cls, *args):
|
|
1339
1536
|
return cls.graph_traversal(None, None, Bytecode()).project(*args)
|
|
@@ -1366,6 +1563,26 @@ class __(object, metaclass=MagicType):
|
|
|
1366
1563
|
def repeat(cls, *args):
|
|
1367
1564
|
return cls.graph_traversal(None, None, Bytecode()).repeat(*args)
|
|
1368
1565
|
|
|
1566
|
+
@classmethod
|
|
1567
|
+
def replace(cls, *args):
|
|
1568
|
+
return cls.graph_traversal(None, None, Bytecode()).replace(*args)
|
|
1569
|
+
|
|
1570
|
+
@classmethod
|
|
1571
|
+
def reverse(cls, *args):
|
|
1572
|
+
return cls.graph_traversal(None, None, Bytecode()).reverse(*args)
|
|
1573
|
+
|
|
1574
|
+
@classmethod
|
|
1575
|
+
def rTrim(cls, *args):
|
|
1576
|
+
warnings.warn(
|
|
1577
|
+
"gremlin_python.process.__.rTrim will be replaced by "
|
|
1578
|
+
"gremlin_python.process.__.r_trim.",
|
|
1579
|
+
DeprecationWarning)
|
|
1580
|
+
return cls.r_trim(*args)
|
|
1581
|
+
|
|
1582
|
+
@classmethod
|
|
1583
|
+
def r_trim(cls, *args):
|
|
1584
|
+
return cls.graph_traversal(None, None, Bytecode()).r_trim(*args)
|
|
1585
|
+
|
|
1369
1586
|
@classmethod
|
|
1370
1587
|
def sack(cls, *args):
|
|
1371
1588
|
return cls.graph_traversal(None, None, Bytecode()).sack(*args)
|
|
@@ -1406,6 +1623,10 @@ class __(object, metaclass=MagicType):
|
|
|
1406
1623
|
def skip(cls, *args):
|
|
1407
1624
|
return cls.graph_traversal(None, None, Bytecode()).skip(*args)
|
|
1408
1625
|
|
|
1626
|
+
@classmethod
|
|
1627
|
+
def split(cls, *args):
|
|
1628
|
+
return cls.graph_traversal(None, None, Bytecode()).split(*args)
|
|
1629
|
+
|
|
1409
1630
|
@classmethod
|
|
1410
1631
|
def store(cls, *args):
|
|
1411
1632
|
return cls.graph_traversal(None, None, Bytecode()).store(*args)
|
|
@@ -1414,6 +1635,10 @@ class __(object, metaclass=MagicType):
|
|
|
1414
1635
|
def subgraph(cls, *args):
|
|
1415
1636
|
return cls.graph_traversal(None, None, Bytecode()).subgraph(*args)
|
|
1416
1637
|
|
|
1638
|
+
@classmethod
|
|
1639
|
+
def substring(cls, *args):
|
|
1640
|
+
return cls.graph_traversal(None, None, Bytecode()).substring(*args)
|
|
1641
|
+
|
|
1417
1642
|
@classmethod
|
|
1418
1643
|
def sum_(cls, *args):
|
|
1419
1644
|
return cls.graph_traversal(None, None, Bytecode()).sum_(*args)
|
|
@@ -1454,6 +1679,14 @@ class __(object, metaclass=MagicType):
|
|
|
1454
1679
|
def to_e(cls, *args):
|
|
1455
1680
|
return cls.graph_traversal(None, None, Bytecode()).to_e(*args)
|
|
1456
1681
|
|
|
1682
|
+
@classmethod
|
|
1683
|
+
def to_lower(cls, *args):
|
|
1684
|
+
return cls.graph_traversal(None, None, Bytecode()).to_lower(*args)
|
|
1685
|
+
|
|
1686
|
+
@classmethod
|
|
1687
|
+
def to_upper(cls, *args):
|
|
1688
|
+
return cls.graph_traversal(None, None, Bytecode()).to_upper(*args)
|
|
1689
|
+
|
|
1457
1690
|
@classmethod
|
|
1458
1691
|
def toV(cls, *args):
|
|
1459
1692
|
warnings.warn(
|
|
@@ -1470,6 +1703,10 @@ class __(object, metaclass=MagicType):
|
|
|
1470
1703
|
def tree(cls, *args):
|
|
1471
1704
|
return cls.graph_traversal(None, None, Bytecode()).tree(*args)
|
|
1472
1705
|
|
|
1706
|
+
@classmethod
|
|
1707
|
+
def trim(cls, *args):
|
|
1708
|
+
return cls.graph_traversal(None, None, Bytecode()).trim(*args)
|
|
1709
|
+
|
|
1473
1710
|
@classmethod
|
|
1474
1711
|
def unfold(cls, *args):
|
|
1475
1712
|
return cls.graph_traversal(None, None, Bytecode()).unfold(*args)
|
|
@@ -1582,6 +1819,10 @@ class Transaction:
|
|
|
1582
1819
|
return session
|
|
1583
1820
|
|
|
1584
1821
|
|
|
1822
|
+
def E(*args):
|
|
1823
|
+
return __.E(*args)
|
|
1824
|
+
|
|
1825
|
+
|
|
1585
1826
|
def V(*args):
|
|
1586
1827
|
return __.V(*args)
|
|
1587
1828
|
|
|
@@ -1614,6 +1855,14 @@ def as_(*args):
|
|
|
1614
1855
|
return __.as_(*args)
|
|
1615
1856
|
|
|
1616
1857
|
|
|
1858
|
+
def as_date(*args):
|
|
1859
|
+
return __.as_date(*args)
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
def as_string(*args):
|
|
1863
|
+
return __.as_string(*args)
|
|
1864
|
+
|
|
1865
|
+
|
|
1617
1866
|
def barrier(*args):
|
|
1618
1867
|
return __.barrier(*args)
|
|
1619
1868
|
|
|
@@ -1662,6 +1911,10 @@ def coin(*args):
|
|
|
1662
1911
|
return __.coin(*args)
|
|
1663
1912
|
|
|
1664
1913
|
|
|
1914
|
+
def concat(*args):
|
|
1915
|
+
return __.concat(*args)
|
|
1916
|
+
|
|
1917
|
+
|
|
1665
1918
|
def constant(*args):
|
|
1666
1919
|
return __.constant(*args)
|
|
1667
1920
|
|
|
@@ -1678,6 +1931,14 @@ def cyclic_path(*args):
|
|
|
1678
1931
|
return __.cyclic_path(*args)
|
|
1679
1932
|
|
|
1680
1933
|
|
|
1934
|
+
def date_add(*args):
|
|
1935
|
+
return __.date_add(*args)
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
def date_diff(*args):
|
|
1939
|
+
return __.date_diff(*args)
|
|
1940
|
+
|
|
1941
|
+
|
|
1681
1942
|
def dedup(*args):
|
|
1682
1943
|
return __.dedup(*args)
|
|
1683
1944
|
|
|
@@ -1722,6 +1983,10 @@ def fold(*args):
|
|
|
1722
1983
|
return __.fold(*args)
|
|
1723
1984
|
|
|
1724
1985
|
|
|
1986
|
+
def format_(*args):
|
|
1987
|
+
return __.format_(*args)
|
|
1988
|
+
|
|
1989
|
+
|
|
1725
1990
|
def group(*args):
|
|
1726
1991
|
return __.group(*args)
|
|
1727
1992
|
|
|
@@ -1826,6 +2091,10 @@ def label(*args):
|
|
|
1826
2091
|
return __.label(*args)
|
|
1827
2092
|
|
|
1828
2093
|
|
|
2094
|
+
def length(*args):
|
|
2095
|
+
return __.length(*args)
|
|
2096
|
+
|
|
2097
|
+
|
|
1829
2098
|
def limit(*args):
|
|
1830
2099
|
return __.limit(*args)
|
|
1831
2100
|
|
|
@@ -1838,6 +2107,14 @@ def loops(*args):
|
|
|
1838
2107
|
return __.loops(*args)
|
|
1839
2108
|
|
|
1840
2109
|
|
|
2110
|
+
def ltrim(*args):
|
|
2111
|
+
return __.l_trim(*args)
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
def l_trim(*args):
|
|
2115
|
+
return __.l_trim(*args)
|
|
2116
|
+
|
|
2117
|
+
|
|
1841
2118
|
def map(*args):
|
|
1842
2119
|
return __.map(*args)
|
|
1843
2120
|
|
|
@@ -1946,6 +2223,22 @@ def repeat(*args):
|
|
|
1946
2223
|
return __.repeat(*args)
|
|
1947
2224
|
|
|
1948
2225
|
|
|
2226
|
+
def replace(*args):
|
|
2227
|
+
return __.replace(*args)
|
|
2228
|
+
|
|
2229
|
+
|
|
2230
|
+
def reverse(*args):
|
|
2231
|
+
return __.reverse(*args)
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
def rTrim(*args):
|
|
2235
|
+
return __.r_trim(*args)
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
def r_trim(*args):
|
|
2239
|
+
return __.r_trim(*args)
|
|
2240
|
+
|
|
2241
|
+
|
|
1949
2242
|
def sack(*args):
|
|
1950
2243
|
return __.sack(*args)
|
|
1951
2244
|
|
|
@@ -1978,6 +2271,10 @@ def skip(*args):
|
|
|
1978
2271
|
return __.skip(*args)
|
|
1979
2272
|
|
|
1980
2273
|
|
|
2274
|
+
def split(*args):
|
|
2275
|
+
return __.split(*args)
|
|
2276
|
+
|
|
2277
|
+
|
|
1981
2278
|
def store(*args):
|
|
1982
2279
|
return __.store(*args)
|
|
1983
2280
|
|
|
@@ -1986,6 +2283,10 @@ def subgraph(*args):
|
|
|
1986
2283
|
return __.subgraph(*args)
|
|
1987
2284
|
|
|
1988
2285
|
|
|
2286
|
+
def substring(*args):
|
|
2287
|
+
return __.substring(*args)
|
|
2288
|
+
|
|
2289
|
+
|
|
1989
2290
|
def sum_(*args):
|
|
1990
2291
|
return __.sum_(*args)
|
|
1991
2292
|
|
|
@@ -2018,6 +2319,14 @@ def to_e(*args):
|
|
|
2018
2319
|
return __.to_e(*args)
|
|
2019
2320
|
|
|
2020
2321
|
|
|
2322
|
+
def to_lower(*args):
|
|
2323
|
+
return __.to_lower(*args)
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
def to_upper(*args):
|
|
2327
|
+
return __.to_upper(*args)
|
|
2328
|
+
|
|
2329
|
+
|
|
2021
2330
|
def toV(*args):
|
|
2022
2331
|
return __.to_v(*args)
|
|
2023
2332
|
|
|
@@ -2030,6 +2339,10 @@ def tree(*args):
|
|
|
2030
2339
|
return __.tree(*args)
|
|
2031
2340
|
|
|
2032
2341
|
|
|
2342
|
+
def trim(*args):
|
|
2343
|
+
return __.trim(*args)
|
|
2344
|
+
|
|
2345
|
+
|
|
2033
2346
|
def unfold(*args):
|
|
2034
2347
|
return __.unfold(*args)
|
|
2035
2348
|
|
|
@@ -2078,6 +2391,10 @@ statics.add_static('and_', and_)
|
|
|
2078
2391
|
|
|
2079
2392
|
statics.add_static('as_', as_)
|
|
2080
2393
|
|
|
2394
|
+
statics.add_static('as_date', as_date)
|
|
2395
|
+
|
|
2396
|
+
statics.add_static('as_string', as_string)
|
|
2397
|
+
|
|
2081
2398
|
statics.add_static('barrier', barrier)
|
|
2082
2399
|
|
|
2083
2400
|
statics.add_static('both', both)
|
|
@@ -2102,6 +2419,8 @@ statics.add_static('coalesce', coalesce)
|
|
|
2102
2419
|
|
|
2103
2420
|
statics.add_static('coin', coin)
|
|
2104
2421
|
|
|
2422
|
+
statics.add_static('concat', concat)
|
|
2423
|
+
|
|
2105
2424
|
statics.add_static('constant', constant)
|
|
2106
2425
|
|
|
2107
2426
|
statics.add_static('count', count)
|
|
@@ -2110,6 +2429,10 @@ statics.add_static('cyclicPath', cyclicPath)
|
|
|
2110
2429
|
|
|
2111
2430
|
statics.add_static('cyclicpath', cyclic_path)
|
|
2112
2431
|
|
|
2432
|
+
statics.add_static('date_add', date_add)
|
|
2433
|
+
|
|
2434
|
+
statics.add_static('date_diff', date_diff)
|
|
2435
|
+
|
|
2113
2436
|
statics.add_static('dedup', dedup)
|
|
2114
2437
|
|
|
2115
2438
|
statics.add_static('drop', drop)
|
|
@@ -2132,6 +2455,8 @@ statics.add_static('flat_map', flat_map)
|
|
|
2132
2455
|
|
|
2133
2456
|
statics.add_static('fold', fold)
|
|
2134
2457
|
|
|
2458
|
+
statics.add_static('format_', format_)
|
|
2459
|
+
|
|
2135
2460
|
statics.add_static('group', group)
|
|
2136
2461
|
|
|
2137
2462
|
statics.add_static('groupCount', groupCount)
|
|
@@ -2182,12 +2507,18 @@ statics.add_static('key', key)
|
|
|
2182
2507
|
|
|
2183
2508
|
statics.add_static('label', label)
|
|
2184
2509
|
|
|
2510
|
+
statics.add_static('length', length)
|
|
2511
|
+
|
|
2185
2512
|
statics.add_static('limit', limit)
|
|
2186
2513
|
|
|
2187
2514
|
statics.add_static('local', local)
|
|
2188
2515
|
|
|
2189
2516
|
statics.add_static('loops', loops)
|
|
2190
2517
|
|
|
2518
|
+
statics.add_static('ltrim', ltrim)
|
|
2519
|
+
|
|
2520
|
+
statics.add_static('l_trim', l_trim)
|
|
2521
|
+
|
|
2191
2522
|
statics.add_static('map', map)
|
|
2192
2523
|
|
|
2193
2524
|
statics.add_static('match', match)
|
|
@@ -2242,6 +2573,14 @@ statics.add_static('range_', range_)
|
|
|
2242
2573
|
|
|
2243
2574
|
statics.add_static('repeat', repeat)
|
|
2244
2575
|
|
|
2576
|
+
statics.add_static('replace', replace)
|
|
2577
|
+
|
|
2578
|
+
statics.add_static('reverse', reverse)
|
|
2579
|
+
|
|
2580
|
+
statics.add_static('rTrim', rTrim)
|
|
2581
|
+
|
|
2582
|
+
statics.add_static('r_trim', r_trim)
|
|
2583
|
+
|
|
2245
2584
|
statics.add_static('sack', sack)
|
|
2246
2585
|
|
|
2247
2586
|
statics.add_static('sample', sample)
|
|
@@ -2258,10 +2597,14 @@ statics.add_static('simple_path', simple_path)
|
|
|
2258
2597
|
|
|
2259
2598
|
statics.add_static('skip', skip)
|
|
2260
2599
|
|
|
2600
|
+
statics.add_static('split', split)
|
|
2601
|
+
|
|
2261
2602
|
statics.add_static('store', store)
|
|
2262
2603
|
|
|
2263
2604
|
statics.add_static('subgraph', subgraph)
|
|
2264
2605
|
|
|
2606
|
+
statics.add_static('substring', substring)
|
|
2607
|
+
|
|
2265
2608
|
statics.add_static('sum_', sum_)
|
|
2266
2609
|
|
|
2267
2610
|
statics.add_static('tail', tail)
|
|
@@ -2280,10 +2623,16 @@ statics.add_static('to_e', to_e)
|
|
|
2280
2623
|
|
|
2281
2624
|
statics.add_static('toV', toV)
|
|
2282
2625
|
|
|
2626
|
+
statics.add_static('to_lower', to_lower)
|
|
2627
|
+
|
|
2628
|
+
statics.add_static('to_upper', to_upper)
|
|
2629
|
+
|
|
2283
2630
|
statics.add_static('to_v', to_v)
|
|
2284
2631
|
|
|
2285
2632
|
statics.add_static('tree', tree)
|
|
2286
2633
|
|
|
2634
|
+
statics.add_static('trim', trim)
|
|
2635
|
+
|
|
2287
2636
|
statics.add_static('unfold', unfold)
|
|
2288
2637
|
|
|
2289
2638
|
statics.add_static('union', union)
|
|
@@ -194,6 +194,13 @@ GryoVersion = Enum('GryoVersion', ' V1_0 V3_0')
|
|
|
194
194
|
statics.add_static('V1_0', GryoVersion.V1_0)
|
|
195
195
|
statics.add_static('V3_0', GryoVersion.V3_0)
|
|
196
196
|
|
|
197
|
+
DT = Enum('DT', ' second minute hour day')
|
|
198
|
+
|
|
199
|
+
statics.add_static('second', DT.second)
|
|
200
|
+
statics.add_static('minute', DT.minute)
|
|
201
|
+
statics.add_static('hour', DT.hour)
|
|
202
|
+
statics.add_static('day', DT.day)
|
|
203
|
+
|
|
197
204
|
Merge = Enum('Merge', ' on_create on_match out_v in_v')
|
|
198
205
|
|
|
199
206
|
statics.add_static('on_create', Merge.on_create)
|
|
@@ -817,6 +824,24 @@ class Bytecode(object):
|
|
|
817
824
|
return Bytecode._create_graph_op("tx", "rollback")
|
|
818
825
|
|
|
819
826
|
|
|
827
|
+
class CardinalityValue(Bytecode):
|
|
828
|
+
def __init__(self, cardinality, val):
|
|
829
|
+
super().__init__()
|
|
830
|
+
self.add_source("CardinalityValueTraversal", cardinality, val)
|
|
831
|
+
|
|
832
|
+
@classmethod
|
|
833
|
+
def single(cls, val):
|
|
834
|
+
return CardinalityValue(Cardinality.single, val)
|
|
835
|
+
|
|
836
|
+
@classmethod
|
|
837
|
+
def list_(cls, val):
|
|
838
|
+
return CardinalityValue(Cardinality.list_, val)
|
|
839
|
+
|
|
840
|
+
@classmethod
|
|
841
|
+
def set_(cls, val):
|
|
842
|
+
return CardinalityValue(Cardinality.set_, val)
|
|
843
|
+
|
|
844
|
+
|
|
820
845
|
'''
|
|
821
846
|
BINDINGS
|
|
822
847
|
'''
|
|
@@ -43,9 +43,10 @@ class Graph(object):
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
class Element(object):
|
|
46
|
-
def __init__(self, id, label):
|
|
46
|
+
def __init__(self, id, label, properties=None):
|
|
47
47
|
self.id = id
|
|
48
48
|
self.label = label
|
|
49
|
+
self.properties = properties
|
|
49
50
|
|
|
50
51
|
def __eq__(self, other):
|
|
51
52
|
return isinstance(other, self.__class__) and self.id == other.id
|
|
@@ -55,16 +56,16 @@ class Element(object):
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
class Vertex(Element):
|
|
58
|
-
def __init__(self, id, label="vertex"):
|
|
59
|
-
Element.__init__(self, id, label)
|
|
59
|
+
def __init__(self, id, label="vertex", properties=None):
|
|
60
|
+
Element.__init__(self, id, label, properties)
|
|
60
61
|
|
|
61
62
|
def __repr__(self):
|
|
62
63
|
return "v[" + str(self.id) + "]"
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
class Edge(Element):
|
|
66
|
-
def __init__(self, id, outV, label, inV):
|
|
67
|
-
Element.__init__(self, id, label)
|
|
67
|
+
def __init__(self, id, outV, label, inV, properties=None):
|
|
68
|
+
Element.__init__(self, id, label, properties)
|
|
68
69
|
self.outV = outV
|
|
69
70
|
self.inV = inV
|
|
70
71
|
|
|
@@ -73,8 +74,8 @@ class Edge(Element):
|
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
class VertexProperty(Element):
|
|
76
|
-
def __init__(self, id, label, value, vertex):
|
|
77
|
-
Element.__init__(self, id, label)
|
|
77
|
+
def __init__(self, id, label, value, vertex, properties=None):
|
|
78
|
+
Element.__init__(self, id, label, properties)
|
|
78
79
|
self.value = value
|
|
79
80
|
self.key = self.label
|
|
80
81
|
self.vertex = vertex
|
|
@@ -33,7 +33,7 @@ from gremlin_python import statics
|
|
|
33
33
|
from gremlin_python.statics import FloatType, BigDecimal, FunctionType, ShortType, IntType, LongType, BigIntType, \
|
|
34
34
|
TypeType, DictType, ListType, SetType, SingleByte, ByteBufferType, GremlinType, \
|
|
35
35
|
SingleChar
|
|
36
|
-
from gremlin_python.process.traversal import Barrier, Binding, Bytecode, Cardinality, Column, Direction, Merge, \
|
|
36
|
+
from gremlin_python.process.traversal import Barrier, Binding, Bytecode, Cardinality, Column, Direction, DT, Merge, \
|
|
37
37
|
Operator, Order, Pick, Pop, P, Scope, TextP, Traversal, Traverser, \
|
|
38
38
|
TraversalStrategy, T
|
|
39
39
|
from gremlin_python.process.graph_traversal import GraphTraversal
|
|
@@ -97,6 +97,7 @@ class DataType(Enum):
|
|
|
97
97
|
metrics = 0x2c
|
|
98
98
|
traversalmetrics = 0x2d
|
|
99
99
|
merge = 0x2e
|
|
100
|
+
dt = 0x2f
|
|
100
101
|
char = 0x80
|
|
101
102
|
duration = 0x81
|
|
102
103
|
inetaddress = 0x82 # todo
|
|
@@ -601,8 +602,11 @@ class EdgeIO(_GraphBinaryTypeIO):
|
|
|
601
602
|
edgelbl = r.to_object(b, DataType.string, False)
|
|
602
603
|
inv = Vertex(r.read_object(b), r.to_object(b, DataType.string, False))
|
|
603
604
|
outv = Vertex(r.read_object(b), r.to_object(b, DataType.string, False))
|
|
604
|
-
|
|
605
|
-
|
|
605
|
+
b.read(2)
|
|
606
|
+
props = r.read_object(b)
|
|
607
|
+
# null properties are returned as empty lists
|
|
608
|
+
properties = [] if props is None else props
|
|
609
|
+
edge = Edge(edgeid, outv, edgelbl, inv, properties)
|
|
606
610
|
return edge
|
|
607
611
|
|
|
608
612
|
|
|
@@ -680,8 +684,12 @@ class VertexIO(_GraphBinaryTypeIO):
|
|
|
680
684
|
|
|
681
685
|
@classmethod
|
|
682
686
|
def _read_vertex(cls, b, r):
|
|
683
|
-
|
|
684
|
-
b.
|
|
687
|
+
vertex_id = r.read_object(b)
|
|
688
|
+
vertex_label = r.to_object(b, DataType.string, False)
|
|
689
|
+
props = r.read_object(b)
|
|
690
|
+
# null properties are returned as empty lists
|
|
691
|
+
properties = [] if props is None else props
|
|
692
|
+
vertex = Vertex(vertex_id, vertex_label, properties)
|
|
685
693
|
return vertex
|
|
686
694
|
|
|
687
695
|
|
|
@@ -707,7 +715,10 @@ class VertexPropertyIO(_GraphBinaryTypeIO):
|
|
|
707
715
|
@classmethod
|
|
708
716
|
def _read_vertexproperty(cls, b, r):
|
|
709
717
|
vp = VertexProperty(r.read_object(b), r.to_object(b, DataType.string, False), r.read_object(b), None)
|
|
710
|
-
b.read(
|
|
718
|
+
b.read(2)
|
|
719
|
+
properties = r.read_object(b)
|
|
720
|
+
# null properties are returned as empty lists
|
|
721
|
+
vp.properties = [] if properties is None else properties
|
|
711
722
|
return vp
|
|
712
723
|
|
|
713
724
|
|
|
@@ -918,6 +929,11 @@ class PSerializer(_GraphBinaryTypeIO):
|
|
|
918
929
|
return to_extend
|
|
919
930
|
|
|
920
931
|
|
|
932
|
+
class DTIO(_EnumIO):
|
|
933
|
+
graphbinary_type = DataType.dt
|
|
934
|
+
python_type = DT
|
|
935
|
+
|
|
936
|
+
|
|
921
937
|
class MergeIO(_EnumIO):
|
|
922
938
|
graphbinary_type = DataType.merge
|
|
923
939
|
python_type = Merge
|
|
@@ -585,7 +585,12 @@ class VertexDeserializer(_GraphSONTypeIO):
|
|
|
585
585
|
|
|
586
586
|
@classmethod
|
|
587
587
|
def objectify(cls, d, reader):
|
|
588
|
-
|
|
588
|
+
properties = None
|
|
589
|
+
if "properties" in d:
|
|
590
|
+
properties = reader.to_object(d["properties"])
|
|
591
|
+
if properties is not None:
|
|
592
|
+
properties = [item for sublist in properties.values() for item in sublist]
|
|
593
|
+
return Vertex(reader.to_object(d["id"]), d.get("label", "vertex"), properties)
|
|
589
594
|
|
|
590
595
|
|
|
591
596
|
class EdgeDeserializer(_GraphSONTypeIO):
|
|
@@ -593,10 +598,16 @@ class EdgeDeserializer(_GraphSONTypeIO):
|
|
|
593
598
|
|
|
594
599
|
@classmethod
|
|
595
600
|
def objectify(cls, d, reader):
|
|
601
|
+
properties = None
|
|
602
|
+
if "properties" in d:
|
|
603
|
+
properties = reader.to_object(d["properties"])
|
|
604
|
+
if properties is not None:
|
|
605
|
+
properties = list(properties.values())
|
|
596
606
|
return Edge(reader.to_object(d["id"]),
|
|
597
607
|
Vertex(reader.to_object(d["outV"]), d.get("outVLabel", "vertex")),
|
|
598
608
|
d.get("label", "edge"),
|
|
599
|
-
Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex"))
|
|
609
|
+
Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex")),
|
|
610
|
+
properties)
|
|
600
611
|
|
|
601
612
|
|
|
602
613
|
class VertexPropertyDeserializer(_GraphSONTypeIO):
|
|
@@ -604,11 +615,17 @@ class VertexPropertyDeserializer(_GraphSONTypeIO):
|
|
|
604
615
|
|
|
605
616
|
@classmethod
|
|
606
617
|
def objectify(cls, d, reader):
|
|
618
|
+
properties = None
|
|
619
|
+
if "properties" in d:
|
|
620
|
+
properties = reader.to_object(d["properties"])
|
|
621
|
+
if properties is not None:
|
|
622
|
+
properties = list(map(lambda x: Property(x[0], x[1], None), properties.items()))
|
|
607
623
|
vertex = Vertex(reader.to_object(d.get("vertex"))) if "vertex" in d else None
|
|
608
624
|
return VertexProperty(reader.to_object(d["id"]),
|
|
609
625
|
d["label"],
|
|
610
626
|
reader.to_object(d["value"]),
|
|
611
|
-
vertex
|
|
627
|
+
vertex,
|
|
628
|
+
properties)
|
|
612
629
|
|
|
613
630
|
|
|
614
631
|
class PropertyDeserializer(_GraphSONTypeIO):
|
|
@@ -685,7 +685,12 @@ class VertexDeserializer(_GraphSONTypeIO):
|
|
|
685
685
|
|
|
686
686
|
@classmethod
|
|
687
687
|
def objectify(cls, d, reader):
|
|
688
|
-
|
|
688
|
+
properties = None
|
|
689
|
+
if "properties" in d:
|
|
690
|
+
properties = reader.to_object(d["properties"])
|
|
691
|
+
if properties is not None:
|
|
692
|
+
properties = [item for sublist in properties.values() for item in sublist]
|
|
693
|
+
return Vertex(reader.to_object(d["id"]), d.get("label", "vertex"), properties)
|
|
689
694
|
|
|
690
695
|
|
|
691
696
|
class EdgeDeserializer(_GraphSONTypeIO):
|
|
@@ -693,10 +698,16 @@ class EdgeDeserializer(_GraphSONTypeIO):
|
|
|
693
698
|
|
|
694
699
|
@classmethod
|
|
695
700
|
def objectify(cls, d, reader):
|
|
701
|
+
properties = None
|
|
702
|
+
if "properties" in d:
|
|
703
|
+
properties = reader.to_object(d["properties"])
|
|
704
|
+
if properties is not None:
|
|
705
|
+
properties = list(properties.values())
|
|
696
706
|
return Edge(reader.to_object(d["id"]),
|
|
697
707
|
Vertex(reader.to_object(d["outV"]), d.get("outVLabel", "vertex")),
|
|
698
708
|
d.get("label", "edge"),
|
|
699
|
-
Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex"))
|
|
709
|
+
Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex")),
|
|
710
|
+
properties)
|
|
700
711
|
|
|
701
712
|
|
|
702
713
|
class VertexPropertyDeserializer(_GraphSONTypeIO):
|
|
@@ -704,11 +715,17 @@ class VertexPropertyDeserializer(_GraphSONTypeIO):
|
|
|
704
715
|
|
|
705
716
|
@classmethod
|
|
706
717
|
def objectify(cls, d, reader):
|
|
718
|
+
properties = None
|
|
719
|
+
if "properties" in d:
|
|
720
|
+
properties = reader.to_object(d["properties"])
|
|
721
|
+
if properties is not None:
|
|
722
|
+
properties = list(map(lambda x: Property(x[0], x[1], None), properties.items()))
|
|
707
723
|
vertex = Vertex(reader.to_object(d.get("vertex"))) if "vertex" in d else None
|
|
708
724
|
return VertexProperty(reader.to_object(d["id"]),
|
|
709
725
|
d["label"],
|
|
710
726
|
reader.to_object(d["value"]),
|
|
711
|
-
vertex
|
|
727
|
+
vertex,
|
|
728
|
+
properties)
|
|
712
729
|
|
|
713
730
|
|
|
714
731
|
class PropertyDeserializer(_GraphSONTypeIO):
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
gremlin_python/__init__.py,sha256=rbOOdo_19nz_mHTXVc5p8ZXLI5pUGMfXLKQiw7Olu7g,850
|
|
2
|
-
gremlin_python/__version__.py,sha256=
|
|
2
|
+
gremlin_python/__version__.py,sha256=4GOYiVUI9q2mOGod7Kr4QvZP3Py3bWvpTm5gbtlr4YY,804
|
|
3
3
|
gremlin_python/statics.py,sha256=BXnrfx25Todku_U0ddd-zB4eyQMf2paT5uuN9znK2fQ,2849
|
|
4
4
|
gremlin_python/driver/__init__.py,sha256=rbOOdo_19nz_mHTXVc5p8ZXLI5pUGMfXLKQiw7Olu7g,850
|
|
5
5
|
gremlin_python/driver/client.py,sha256=s-6cV2C0EMpvmyZZXWTq8kiFZEFLdn_HmWMF05mrSzU,8166
|
|
6
6
|
gremlin_python/driver/connection.py,sha256=9Jia02-47hzX7ElMhMWBCKrrvOm1eUnmOOnl_S730PE,3857
|
|
7
|
-
gremlin_python/driver/driver_remote_connection.py,sha256=
|
|
7
|
+
gremlin_python/driver/driver_remote_connection.py,sha256=8htMF-TYd0FJDQciL_nzTsVbzkgWO8lCBivx6qv2LU8,8852
|
|
8
8
|
gremlin_python/driver/protocol.py,sha256=SqDZWeu3p2WHCzv8k1u2Q1icg2AIl03OhkWsB4KoBnw,11785
|
|
9
9
|
gremlin_python/driver/remote_connection.py,sha256=DtglObhiyLDIgLKIcv7enDuXd9KiCJVLXWAvreBQ4wA,3014
|
|
10
10
|
gremlin_python/driver/request.py,sha256=IlqBmQlT2UU95xbY6z1ajlmNQeDZ4ePzT4uF8M0USFk,953
|
|
11
11
|
gremlin_python/driver/resultset.py,sha256=_-13igfH1zQ72mgreDptPmUaXnadnprERVQTSZWeIl4,2669
|
|
12
12
|
gremlin_python/driver/serializer.py,sha256=wFCPAltRB2F0p9ZFyD0x2thoBmI81gPFZhAkV5XLBOQ,10244
|
|
13
13
|
gremlin_python/driver/transport.py,sha256=aEXb9oS1SMI9oKWYINnWuYhYaosi6FdsOJ7oj6FzkkY,1246
|
|
14
|
-
gremlin_python/driver/useragent.py,sha256=
|
|
14
|
+
gremlin_python/driver/useragent.py,sha256=DCwuOjy9BGDAN73cUskm3rQICtMemOtwAzecyYCXXU8,1588
|
|
15
15
|
gremlin_python/driver/aiohttp/__init__.py,sha256=xzdixoKYCJCe4aRILYqdartQi4Py5fcQWqif3zzyUC8,787
|
|
16
16
|
gremlin_python/driver/aiohttp/transport.py,sha256=hHeozoAkkCLgbHqZxCC0lqZTNk6tg4OqF1JqPc7B8HQ,11269
|
|
17
17
|
gremlin_python/process/__init__.py,sha256=rbOOdo_19nz_mHTXVc5p8ZXLI5pUGMfXLKQiw7Olu7g,850
|
|
18
18
|
gremlin_python/process/anonymous_traversal.py,sha256=A8evyPIAciRGiauDqUbyo4XnG3QTdO28l-TF2K7Ir2g,2448
|
|
19
|
-
gremlin_python/process/graph_traversal.py,sha256=
|
|
19
|
+
gremlin_python/process/graph_traversal.py,sha256=g9TUBp5plcQPkc2nqU5Q93Tg07Q6PrgZRWvdY6WEax0,69311
|
|
20
20
|
gremlin_python/process/strategies.py,sha256=95WIhzvvqejCEDOlhICGji9HgkwTUySGKt-yNCBTTh8,9474
|
|
21
21
|
gremlin_python/process/translator.py,sha256=NuaA2WfepvgDm3DrNa_u2Qvz70s9t6ICbFltPglQwBI,11147
|
|
22
|
-
gremlin_python/process/traversal.py,sha256=
|
|
22
|
+
gremlin_python/process/traversal.py,sha256=3xYpSeZyCxziA2nP3ZEhwfpcnDFBsy0t8utIYy4PG2c,23122
|
|
23
23
|
gremlin_python/structure/__init__.py,sha256=zo5zR3kruv1h4_A80IxZ1IZrS0Ud5lVjpGm0PxBAP20,852
|
|
24
|
-
gremlin_python/structure/graph.py,sha256=
|
|
24
|
+
gremlin_python/structure/graph.py,sha256=hBSsn6tYU4qRhCc53SKrcUu8VfSwvtL2m-PE2n9VZS4,4506
|
|
25
25
|
gremlin_python/structure/io/__init__.py,sha256=zo5zR3kruv1h4_A80IxZ1IZrS0Ud5lVjpGm0PxBAP20,852
|
|
26
|
-
gremlin_python/structure/io/graphbinaryV1.py,sha256=
|
|
27
|
-
gremlin_python/structure/io/graphsonV2d0.py,sha256=
|
|
28
|
-
gremlin_python/structure/io/graphsonV3d0.py,sha256=
|
|
26
|
+
gremlin_python/structure/io/graphbinaryV1.py,sha256=TS2_y6e0IcM8eIjTh_jve7wSgErkazrCQwJqUKo_dn0,37708
|
|
27
|
+
gremlin_python/structure/io/graphsonV2d0.py,sha256=uR8qG8H35RxNpqhamT79w6WEHz5ITyyXD5u881C0J-U,22196
|
|
28
|
+
gremlin_python/structure/io/graphsonV3d0.py,sha256=hJcz8KlHhS_BAwvwKC3dA24POZYK22a3W-AETdksCT4,25518
|
|
29
29
|
gremlin_python/structure/io/util.py,sha256=x0OEkGGX2ajgOuSbz1j3dO3_IlOPnPLV4m6SGAmNAeM,1846
|
|
30
|
-
gremlinpython-3.
|
|
31
|
-
gremlinpython-3.
|
|
32
|
-
gremlinpython-3.
|
|
33
|
-
gremlinpython-3.
|
|
34
|
-
gremlinpython-3.
|
|
35
|
-
gremlinpython-3.
|
|
36
|
-
gremlinpython-3.
|
|
37
|
-
gremlinpython-3.
|
|
30
|
+
gremlinpython-3.7.3.data/data/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
31
|
+
gremlinpython-3.7.3.data/data/NOTICE,sha256=h-5PKu8VoRZYtIoIbQYwvbtBWDK16kNDtp0e1Lu-WXc,170
|
|
32
|
+
gremlinpython-3.7.3.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
33
|
+
gremlinpython-3.7.3.dist-info/METADATA,sha256=4N290HG4TLjL5fH4eSnNs8t8KPw2JgczPG3JafpBYmI,6436
|
|
34
|
+
gremlinpython-3.7.3.dist-info/NOTICE,sha256=h-5PKu8VoRZYtIoIbQYwvbtBWDK16kNDtp0e1Lu-WXc,170
|
|
35
|
+
gremlinpython-3.7.3.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
36
|
+
gremlinpython-3.7.3.dist-info/top_level.txt,sha256=VVeR1g-oOCZBmKIaVzZ7fF2BYrnqOWpw7C2H71ksTAU,15
|
|
37
|
+
gremlinpython-3.7.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|