gremlin 3.5.2 → 3.5.3

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.
Files changed (88) hide show
  1. package/.eslintrc.js +154 -0
  2. package/.prettierrc.js +29 -0
  3. package/Gruntfile.js +15 -16
  4. package/doc/AnonymousTraversalSource.html +4 -4
  5. package/doc/Authenticator.html +1 -1
  6. package/doc/Bytecode.html +6 -6
  7. package/doc/Client.html +137 -63
  8. package/doc/Connection.html +88 -4
  9. package/doc/DriverRemoteConnection.html +10 -10
  10. package/doc/EdgeLabelVerificationStrategy.html +1 -1
  11. package/doc/Graph.html +1 -1
  12. package/doc/GraphSON2Reader.html +3 -3
  13. package/doc/GraphSON2Writer.html +2 -2
  14. package/doc/GraphSON3Reader.html +2 -2
  15. package/doc/GraphSON3Writer.html +2 -2
  16. package/doc/GraphTraversal.html +106 -106
  17. package/doc/GraphTraversalSource.html +18 -18
  18. package/doc/HaltedTraverserStrategy.html +2 -2
  19. package/doc/MatchAlgorithmStrategy.html +2 -2
  20. package/doc/P.html +12 -12
  21. package/doc/PartitionStrategy.html +2 -2
  22. package/doc/Path.html +1 -1
  23. package/doc/PlainTextSaslAuthenticator.html +1 -1
  24. package/doc/ProductiveByStrategy.html +1 -1
  25. package/doc/RemoteConnection.html +9 -9
  26. package/doc/RemoteStrategy.html +3 -3
  27. package/doc/RemoteTraversal.html +2 -2
  28. package/doc/ReservedKeysVerificationStrategy.html +2 -2
  29. package/doc/ResponseError.html +1 -1
  30. package/doc/ResultSet.html +6 -6
  31. package/doc/SaslAuthenticator.html +1 -1
  32. package/doc/SaslMechanismBase.html +1 -1
  33. package/doc/SaslMechanismPlain.html +5 -5
  34. package/doc/SeedStrategy.html +2 -2
  35. package/doc/SubgraphStrategy.html +2 -2
  36. package/doc/TextP.html +9 -9
  37. package/doc/Transaction.html +5 -5
  38. package/doc/Translator.html +1 -1
  39. package/doc/TraversalStrategies.html +4 -4
  40. package/doc/TraversalStrategy.html +2 -2
  41. package/doc/TypeSerializer.html +1 -1
  42. package/doc/driver_auth_authenticator.js.html +3 -3
  43. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
  44. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +25 -16
  45. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +6 -6
  46. package/doc/driver_auth_sasl-authenticator.js.html +2 -2
  47. package/doc/driver_client.js.html +69 -23
  48. package/doc/driver_connection.js.html +107 -88
  49. package/doc/driver_driver-remote-connection.js.html +11 -10
  50. package/doc/driver_remote-connection.js.html +3 -4
  51. package/doc/driver_response-error.js.html +4 -3
  52. package/doc/driver_result-set.js.html +3 -3
  53. package/doc/global.html +199 -2
  54. package/doc/index.html +1 -1
  55. package/doc/process_anonymous-traversal.js.html +3 -3
  56. package/doc/process_bytecode.js.html +10 -8
  57. package/doc/process_graph-traversal.js.html +193 -142
  58. package/doc/process_transaction.js.html +15 -8
  59. package/doc/process_translator.js.html +13 -10
  60. package/doc/process_traversal-strategy.js.html +59 -53
  61. package/doc/process_traversal.js.html +100 -107
  62. package/doc/structure_graph.js.html +6 -6
  63. package/doc/structure_io_graph-serializer.js.html +64 -17
  64. package/doc/structure_io_type-serializers.js.html +85 -88
  65. package/index.js +5 -5
  66. package/lib/driver/auth/authenticator.js +2 -2
  67. package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
  68. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
  69. package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
  70. package/lib/driver/auth/sasl-authenticator.js +1 -1
  71. package/lib/driver/client.js +68 -22
  72. package/lib/driver/connection.js +106 -87
  73. package/lib/driver/driver-remote-connection.js +10 -9
  74. package/lib/driver/remote-connection.js +2 -3
  75. package/lib/driver/response-error.js +2 -2
  76. package/lib/driver/result-set.js +1 -2
  77. package/lib/process/anonymous-traversal.js +1 -2
  78. package/lib/process/bytecode.js +9 -7
  79. package/lib/process/graph-traversal.js +191 -141
  80. package/lib/process/transaction.js +13 -7
  81. package/lib/process/translator.js +11 -9
  82. package/lib/process/traversal-strategy.js +57 -52
  83. package/lib/process/traversal.js +99 -106
  84. package/lib/structure/graph.js +5 -5
  85. package/lib/structure/io/graph-serializer.js +62 -16
  86. package/lib/structure/io/type-serializers.js +84 -87
  87. package/lib/utils.js +15 -10
  88. package/package.json +10 -5
@@ -32,7 +32,6 @@ const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy } = require(
32
32
  * Represents the primary DSL of the Gremlin traversal machine.
33
33
  */
34
34
  class GraphTraversalSource {
35
-
36
35
  /**
37
36
  * Creates a new instance of {@link GraphTraversalSource}.
38
37
  * @param {Graph} graph
@@ -51,7 +50,7 @@ class GraphTraversalSource {
51
50
  // in order to keep the constructor unchanged within 3.5.x we can try to pop the RemoteConnection out of the
52
51
  // TraversalStrategies. keeping this unchanged will allow user DSLs to not take a break.
53
52
  // TODO: refactor this to be nicer in 3.6.0 when we can take a breaking change
54
- const strat = traversalStrategies.strategies.find(ts => ts.fqcn === "js:RemoteStrategy");
53
+ const strat = traversalStrategies.strategies.find((ts) => ts.fqcn === 'js:RemoteStrategy');
55
54
  this.remoteConnection = strat !== undefined ? strat.connection : undefined;
56
55
  }
57
56
 
@@ -62,8 +61,13 @@ class GraphTraversalSource {
62
61
  withRemote(remoteConnection) {
63
62
  const traversalStrategy = new TraversalStrategies(this.traversalStrategies);
64
63
  traversalStrategy.addStrategy(new remote.RemoteStrategy(remoteConnection));
65
- return new this.graphTraversalSourceClass(this.graph, traversalStrategy, new Bytecode(this.bytecode),
66
- this.graphTraversalSourceClass, this.graphTraversalClass);
64
+ return new this.graphTraversalSourceClass(
65
+ this.graph,
66
+ traversalStrategy,
67
+ new Bytecode(this.bytecode),
68
+ this.graphTraversalSourceClass,
69
+ this.graphTraversalClass,
70
+ );
67
71
  }
68
72
 
69
73
  /**
@@ -73,7 +77,7 @@ class GraphTraversalSource {
73
77
  tx() {
74
78
  // you can't do g.tx().begin().tx() - no child transactions
75
79
  if (this.remoteConnection && this.remoteConnection.isSessionBound) {
76
- throw new Error("This TraversalSource is already bound to a transaction - child transactions are not supported")
80
+ throw new Error('This TraversalSource is already bound to a transaction - child transactions are not supported');
77
81
  }
78
82
 
79
83
  return new Transaction(this);
@@ -90,9 +94,17 @@ class GraphTraversalSource {
90
94
  * @returns {GraphTraversalSource}
91
95
  */
92
96
  withComputer(graphComputer, workers, result, persist, vertices, edges, configuration) {
93
- return this.withStrategies(new VertexProgramStrategy({graphComputer: graphComputer,
94
- workers: workers, result: result, persist: persist, vertices: vertices, edges: edges,
95
- configuration: configuration}));
97
+ return this.withStrategies(
98
+ new VertexProgramStrategy({
99
+ graphComputer: graphComputer,
100
+ workers: workers,
101
+ result: result,
102
+ persist: persist,
103
+ vertices: vertices,
104
+ edges: edges,
105
+ configuration: configuration,
106
+ }),
107
+ );
96
108
  }
97
109
 
98
110
  /**
@@ -101,18 +113,23 @@ class GraphTraversalSource {
101
113
  * @param {Object} value if not specified, the value with default to {@code true}
102
114
  * @returns {GraphTraversalSource}
103
115
  */
104
- with_(key, value=undefined) {
116
+ with_(key, value = undefined) {
105
117
  const val = value === undefined ? true : value;
106
118
  let optionsStrategy = this.bytecode.sourceInstructions.find(
107
- i => i[0] === "withStrategies" && i[1] instanceof OptionsStrategy);
119
+ (i) => i[0] === 'withStrategies' && i[1] instanceof OptionsStrategy,
120
+ );
108
121
  if (optionsStrategy === undefined) {
109
- optionsStrategy = new OptionsStrategy({[key]: val});
122
+ optionsStrategy = new OptionsStrategy({ [key]: val });
110
123
  return this.withStrategies(optionsStrategy);
111
- } else {
112
- optionsStrategy[1].configuration[key] = val;
113
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies),
114
- this.bytecode, this.graphTraversalSourceClass, this.graphTraversalClass);
115
124
  }
125
+ optionsStrategy[1].configuration[key] = val;
126
+ return new this.graphTraversalSourceClass(
127
+ this.graph,
128
+ new TraversalStrategies(this.traversalStrategies),
129
+ this.bytecode,
130
+ this.graphTraversalSourceClass,
131
+ this.graphTraversalClass,
132
+ );
116
133
  }
117
134
 
118
135
  /**
@@ -122,7 +139,7 @@ class GraphTraversalSource {
122
139
  toString() {
123
140
  return 'graphtraversalsource[' + this.graph.toString() + ']';
124
141
  }
125
-
142
+
126
143
  /**
127
144
  * Graph Traversal Source withBulk method.
128
145
  * @param {...Object} args
@@ -130,9 +147,15 @@ class GraphTraversalSource {
130
147
  */
131
148
  withBulk(...args) {
132
149
  const b = new Bytecode(this.bytecode).addSource('withBulk', args);
133
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
150
+ return new this.graphTraversalSourceClass(
151
+ this.graph,
152
+ new TraversalStrategies(this.traversalStrategies),
153
+ b,
154
+ this.graphTraversalSourceClass,
155
+ this.graphTraversalClass,
156
+ );
134
157
  }
135
-
158
+
136
159
  /**
137
160
  * Graph Traversal Source withPath method.
138
161
  * @param {...Object} args
@@ -140,9 +163,15 @@ class GraphTraversalSource {
140
163
  */
141
164
  withPath(...args) {
142
165
  const b = new Bytecode(this.bytecode).addSource('withPath', args);
143
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
166
+ return new this.graphTraversalSourceClass(
167
+ this.graph,
168
+ new TraversalStrategies(this.traversalStrategies),
169
+ b,
170
+ this.graphTraversalSourceClass,
171
+ this.graphTraversalClass,
172
+ );
144
173
  }
145
-
174
+
146
175
  /**
147
176
  * Graph Traversal Source withSack method.
148
177
  * @param {...Object} args
@@ -150,9 +179,15 @@ class GraphTraversalSource {
150
179
  */
151
180
  withSack(...args) {
152
181
  const b = new Bytecode(this.bytecode).addSource('withSack', args);
153
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
182
+ return new this.graphTraversalSourceClass(
183
+ this.graph,
184
+ new TraversalStrategies(this.traversalStrategies),
185
+ b,
186
+ this.graphTraversalSourceClass,
187
+ this.graphTraversalClass,
188
+ );
154
189
  }
155
-
190
+
156
191
  /**
157
192
  * Graph Traversal Source withSideEffect method.
158
193
  * @param {...Object} args
@@ -160,9 +195,15 @@ class GraphTraversalSource {
160
195
  */
161
196
  withSideEffect(...args) {
162
197
  const b = new Bytecode(this.bytecode).addSource('withSideEffect', args);
163
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
198
+ return new this.graphTraversalSourceClass(
199
+ this.graph,
200
+ new TraversalStrategies(this.traversalStrategies),
201
+ b,
202
+ this.graphTraversalSourceClass,
203
+ this.graphTraversalClass,
204
+ );
164
205
  }
165
-
206
+
166
207
  /**
167
208
  * Graph Traversal Source withStrategies method.
168
209
  * @param {...Object} args
@@ -170,9 +211,15 @@ class GraphTraversalSource {
170
211
  */
171
212
  withStrategies(...args) {
172
213
  const b = new Bytecode(this.bytecode).addSource('withStrategies', args);
173
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
214
+ return new this.graphTraversalSourceClass(
215
+ this.graph,
216
+ new TraversalStrategies(this.traversalStrategies),
217
+ b,
218
+ this.graphTraversalSourceClass,
219
+ this.graphTraversalClass,
220
+ );
174
221
  }
175
-
222
+
176
223
  /**
177
224
  * Graph Traversal Source withoutStrategies method.
178
225
  * @param {...Object} args
@@ -180,9 +227,15 @@ class GraphTraversalSource {
180
227
  */
181
228
  withoutStrategies(...args) {
182
229
  const b = new Bytecode(this.bytecode).addSource('withoutStrategies', args);
183
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
230
+ return new this.graphTraversalSourceClass(
231
+ this.graph,
232
+ new TraversalStrategies(this.traversalStrategies),
233
+ b,
234
+ this.graphTraversalSourceClass,
235
+ this.graphTraversalClass,
236
+ );
184
237
  }
185
-
238
+
186
239
  /**
187
240
  * E GraphTraversalSource step method.
188
241
  * @param {...Object} args
@@ -192,7 +245,7 @@ class GraphTraversalSource {
192
245
  const b = new Bytecode(this.bytecode).addStep('E', args);
193
246
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
194
247
  }
195
-
248
+
196
249
  /**
197
250
  * V GraphTraversalSource step method.
198
251
  * @param {...Object} args
@@ -202,7 +255,7 @@ class GraphTraversalSource {
202
255
  const b = new Bytecode(this.bytecode).addStep('V', args);
203
256
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
204
257
  }
205
-
258
+
206
259
  /**
207
260
  * addE GraphTraversalSource step method.
208
261
  * @param {...Object} args
@@ -212,7 +265,7 @@ class GraphTraversalSource {
212
265
  const b = new Bytecode(this.bytecode).addStep('addE', args);
213
266
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
214
267
  }
215
-
268
+
216
269
  /**
217
270
  * addV GraphTraversalSource step method.
218
271
  * @param {...Object} args
@@ -222,7 +275,7 @@ class GraphTraversalSource {
222
275
  const b = new Bytecode(this.bytecode).addStep('addV', args);
223
276
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
224
277
  }
225
-
278
+
226
279
  /**
227
280
  * inject GraphTraversalSource step method.
228
281
  * @param {...Object} args
@@ -232,7 +285,7 @@ class GraphTraversalSource {
232
285
  const b = new Bytecode(this.bytecode).addStep('inject', args);
233
286
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
234
287
  }
235
-
288
+
236
289
  /**
237
290
  * io GraphTraversalSource step method.
238
291
  * @param {...Object} args
@@ -242,7 +295,6 @@ class GraphTraversalSource {
242
295
  const b = new Bytecode(this.bytecode).addStep('io', args);
243
296
  return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
244
297
  }
245
-
246
298
  }
247
299
 
248
300
  /**
@@ -260,7 +312,6 @@ class GraphTraversal extends Traversal {
260
312
  return new GraphTraversal(this.graph, this.traversalStrategies, this.getBytecode());
261
313
  }
262
314
 
263
-
264
315
  /**
265
316
  * Graph traversal V method.
266
317
  * @param {...Object} args
@@ -270,7 +321,7 @@ class GraphTraversal extends Traversal {
270
321
  this.bytecode.addStep('V', args);
271
322
  return this;
272
323
  }
273
-
324
+
274
325
  /**
275
326
  * Graph traversal addE method.
276
327
  * @param {...Object} args
@@ -280,7 +331,7 @@ class GraphTraversal extends Traversal {
280
331
  this.bytecode.addStep('addE', args);
281
332
  return this;
282
333
  }
283
-
334
+
284
335
  /**
285
336
  * Graph traversal addV method.
286
337
  * @param {...Object} args
@@ -290,7 +341,7 @@ class GraphTraversal extends Traversal {
290
341
  this.bytecode.addStep('addV', args);
291
342
  return this;
292
343
  }
293
-
344
+
294
345
  /**
295
346
  * Graph traversal aggregate method.
296
347
  * @param {...Object} args
@@ -300,7 +351,7 @@ class GraphTraversal extends Traversal {
300
351
  this.bytecode.addStep('aggregate', args);
301
352
  return this;
302
353
  }
303
-
354
+
304
355
  /**
305
356
  * Graph traversal and method.
306
357
  * @param {...Object} args
@@ -310,7 +361,7 @@ class GraphTraversal extends Traversal {
310
361
  this.bytecode.addStep('and', args);
311
362
  return this;
312
363
  }
313
-
364
+
314
365
  /**
315
366
  * Graph traversal as method.
316
367
  * @param {...Object} args
@@ -320,7 +371,7 @@ class GraphTraversal extends Traversal {
320
371
  this.bytecode.addStep('as', args);
321
372
  return this;
322
373
  }
323
-
374
+
324
375
  /**
325
376
  * Graph traversal barrier method.
326
377
  * @param {...Object} args
@@ -330,7 +381,7 @@ class GraphTraversal extends Traversal {
330
381
  this.bytecode.addStep('barrier', args);
331
382
  return this;
332
383
  }
333
-
384
+
334
385
  /**
335
386
  * Graph traversal both method.
336
387
  * @param {...Object} args
@@ -340,7 +391,7 @@ class GraphTraversal extends Traversal {
340
391
  this.bytecode.addStep('both', args);
341
392
  return this;
342
393
  }
343
-
394
+
344
395
  /**
345
396
  * Graph traversal bothE method.
346
397
  * @param {...Object} args
@@ -350,7 +401,7 @@ class GraphTraversal extends Traversal {
350
401
  this.bytecode.addStep('bothE', args);
351
402
  return this;
352
403
  }
353
-
404
+
354
405
  /**
355
406
  * Graph traversal bothV method.
356
407
  * @param {...Object} args
@@ -360,7 +411,7 @@ class GraphTraversal extends Traversal {
360
411
  this.bytecode.addStep('bothV', args);
361
412
  return this;
362
413
  }
363
-
414
+
364
415
  /**
365
416
  * Graph traversal branch method.
366
417
  * @param {...Object} args
@@ -370,7 +421,7 @@ class GraphTraversal extends Traversal {
370
421
  this.bytecode.addStep('branch', args);
371
422
  return this;
372
423
  }
373
-
424
+
374
425
  /**
375
426
  * Graph traversal by method.
376
427
  * @param {...Object} args
@@ -380,7 +431,7 @@ class GraphTraversal extends Traversal {
380
431
  this.bytecode.addStep('by', args);
381
432
  return this;
382
433
  }
383
-
434
+
384
435
  /**
385
436
  * Graph traversal cap method.
386
437
  * @param {...Object} args
@@ -390,7 +441,7 @@ class GraphTraversal extends Traversal {
390
441
  this.bytecode.addStep('cap', args);
391
442
  return this;
392
443
  }
393
-
444
+
394
445
  /**
395
446
  * Graph traversal choose method.
396
447
  * @param {...Object} args
@@ -400,7 +451,7 @@ class GraphTraversal extends Traversal {
400
451
  this.bytecode.addStep('choose', args);
401
452
  return this;
402
453
  }
403
-
454
+
404
455
  /**
405
456
  * Graph traversal coalesce method.
406
457
  * @param {...Object} args
@@ -410,7 +461,7 @@ class GraphTraversal extends Traversal {
410
461
  this.bytecode.addStep('coalesce', args);
411
462
  return this;
412
463
  }
413
-
464
+
414
465
  /**
415
466
  * Graph traversal coin method.
416
467
  * @param {...Object} args
@@ -420,7 +471,7 @@ class GraphTraversal extends Traversal {
420
471
  this.bytecode.addStep('coin', args);
421
472
  return this;
422
473
  }
423
-
474
+
424
475
  /**
425
476
  * Graph traversal connectedComponent method.
426
477
  * @param {...Object} args
@@ -430,7 +481,7 @@ class GraphTraversal extends Traversal {
430
481
  this.bytecode.addStep('connectedComponent', args);
431
482
  return this;
432
483
  }
433
-
484
+
434
485
  /**
435
486
  * Graph traversal constant method.
436
487
  * @param {...Object} args
@@ -440,7 +491,7 @@ class GraphTraversal extends Traversal {
440
491
  this.bytecode.addStep('constant', args);
441
492
  return this;
442
493
  }
443
-
494
+
444
495
  /**
445
496
  * Graph traversal count method.
446
497
  * @param {...Object} args
@@ -450,7 +501,7 @@ class GraphTraversal extends Traversal {
450
501
  this.bytecode.addStep('count', args);
451
502
  return this;
452
503
  }
453
-
504
+
454
505
  /**
455
506
  * Graph traversal cyclicPath method.
456
507
  * @param {...Object} args
@@ -460,7 +511,7 @@ class GraphTraversal extends Traversal {
460
511
  this.bytecode.addStep('cyclicPath', args);
461
512
  return this;
462
513
  }
463
-
514
+
464
515
  /**
465
516
  * Graph traversal dedup method.
466
517
  * @param {...Object} args
@@ -470,7 +521,7 @@ class GraphTraversal extends Traversal {
470
521
  this.bytecode.addStep('dedup', args);
471
522
  return this;
472
523
  }
473
-
524
+
474
525
  /**
475
526
  * Graph traversal drop method.
476
527
  * @param {...Object} args
@@ -480,7 +531,7 @@ class GraphTraversal extends Traversal {
480
531
  this.bytecode.addStep('drop', args);
481
532
  return this;
482
533
  }
483
-
534
+
484
535
  /**
485
536
  * Graph traversal elementMap method.
486
537
  * @param {...Object} args
@@ -490,7 +541,7 @@ class GraphTraversal extends Traversal {
490
541
  this.bytecode.addStep('elementMap', args);
491
542
  return this;
492
543
  }
493
-
544
+
494
545
  /**
495
546
  * Graph traversal emit method.
496
547
  * @param {...Object} args
@@ -500,7 +551,7 @@ class GraphTraversal extends Traversal {
500
551
  this.bytecode.addStep('emit', args);
501
552
  return this;
502
553
  }
503
-
554
+
504
555
  /**
505
556
  * Graph traversal filter method.
506
557
  * @param {...Object} args
@@ -510,7 +561,7 @@ class GraphTraversal extends Traversal {
510
561
  this.bytecode.addStep('filter', args);
511
562
  return this;
512
563
  }
513
-
564
+
514
565
  /**
515
566
  * Graph traversal flatMap method.
516
567
  * @param {...Object} args
@@ -520,7 +571,7 @@ class GraphTraversal extends Traversal {
520
571
  this.bytecode.addStep('flatMap', args);
521
572
  return this;
522
573
  }
523
-
574
+
524
575
  /**
525
576
  * Graph traversal fold method.
526
577
  * @param {...Object} args
@@ -530,7 +581,7 @@ class GraphTraversal extends Traversal {
530
581
  this.bytecode.addStep('fold', args);
531
582
  return this;
532
583
  }
533
-
584
+
534
585
  /**
535
586
  * Graph traversal from method.
536
587
  * @param {...Object} args
@@ -540,7 +591,7 @@ class GraphTraversal extends Traversal {
540
591
  this.bytecode.addStep('from', args);
541
592
  return this;
542
593
  }
543
-
594
+
544
595
  /**
545
596
  * Graph traversal group method.
546
597
  * @param {...Object} args
@@ -550,7 +601,7 @@ class GraphTraversal extends Traversal {
550
601
  this.bytecode.addStep('group', args);
551
602
  return this;
552
603
  }
553
-
604
+
554
605
  /**
555
606
  * Graph traversal groupCount method.
556
607
  * @param {...Object} args
@@ -560,7 +611,7 @@ class GraphTraversal extends Traversal {
560
611
  this.bytecode.addStep('groupCount', args);
561
612
  return this;
562
613
  }
563
-
614
+
564
615
  /**
565
616
  * Graph traversal has method.
566
617
  * @param {...Object} args
@@ -570,7 +621,7 @@ class GraphTraversal extends Traversal {
570
621
  this.bytecode.addStep('has', args);
571
622
  return this;
572
623
  }
573
-
624
+
574
625
  /**
575
626
  * Graph traversal hasId method.
576
627
  * @param {...Object} args
@@ -580,7 +631,7 @@ class GraphTraversal extends Traversal {
580
631
  this.bytecode.addStep('hasId', args);
581
632
  return this;
582
633
  }
583
-
634
+
584
635
  /**
585
636
  * Graph traversal hasKey method.
586
637
  * @param {...Object} args
@@ -590,7 +641,7 @@ class GraphTraversal extends Traversal {
590
641
  this.bytecode.addStep('hasKey', args);
591
642
  return this;
592
643
  }
593
-
644
+
594
645
  /**
595
646
  * Graph traversal hasLabel method.
596
647
  * @param {...Object} args
@@ -600,7 +651,7 @@ class GraphTraversal extends Traversal {
600
651
  this.bytecode.addStep('hasLabel', args);
601
652
  return this;
602
653
  }
603
-
654
+
604
655
  /**
605
656
  * Graph traversal hasNot method.
606
657
  * @param {...Object} args
@@ -610,7 +661,7 @@ class GraphTraversal extends Traversal {
610
661
  this.bytecode.addStep('hasNot', args);
611
662
  return this;
612
663
  }
613
-
664
+
614
665
  /**
615
666
  * Graph traversal hasValue method.
616
667
  * @param {...Object} args
@@ -620,7 +671,7 @@ class GraphTraversal extends Traversal {
620
671
  this.bytecode.addStep('hasValue', args);
621
672
  return this;
622
673
  }
623
-
674
+
624
675
  /**
625
676
  * Graph traversal id method.
626
677
  * @param {...Object} args
@@ -630,7 +681,7 @@ class GraphTraversal extends Traversal {
630
681
  this.bytecode.addStep('id', args);
631
682
  return this;
632
683
  }
633
-
684
+
634
685
  /**
635
686
  * Graph traversal identity method.
636
687
  * @param {...Object} args
@@ -640,7 +691,7 @@ class GraphTraversal extends Traversal {
640
691
  this.bytecode.addStep('identity', args);
641
692
  return this;
642
693
  }
643
-
694
+
644
695
  /**
645
696
  * Graph traversal in method.
646
697
  * @param {...Object} args
@@ -650,7 +701,7 @@ class GraphTraversal extends Traversal {
650
701
  this.bytecode.addStep('in', args);
651
702
  return this;
652
703
  }
653
-
704
+
654
705
  /**
655
706
  * Graph traversal inE method.
656
707
  * @param {...Object} args
@@ -660,7 +711,7 @@ class GraphTraversal extends Traversal {
660
711
  this.bytecode.addStep('inE', args);
661
712
  return this;
662
713
  }
663
-
714
+
664
715
  /**
665
716
  * Graph traversal inV method.
666
717
  * @param {...Object} args
@@ -670,7 +721,7 @@ class GraphTraversal extends Traversal {
670
721
  this.bytecode.addStep('inV', args);
671
722
  return this;
672
723
  }
673
-
724
+
674
725
  /**
675
726
  * Graph traversal index method.
676
727
  * @param {...Object} args
@@ -680,7 +731,7 @@ class GraphTraversal extends Traversal {
680
731
  this.bytecode.addStep('index', args);
681
732
  return this;
682
733
  }
683
-
734
+
684
735
  /**
685
736
  * Graph traversal inject method.
686
737
  * @param {...Object} args
@@ -690,7 +741,7 @@ class GraphTraversal extends Traversal {
690
741
  this.bytecode.addStep('inject', args);
691
742
  return this;
692
743
  }
693
-
744
+
694
745
  /**
695
746
  * Graph traversal is method.
696
747
  * @param {...Object} args
@@ -700,7 +751,7 @@ class GraphTraversal extends Traversal {
700
751
  this.bytecode.addStep('is', args);
701
752
  return this;
702
753
  }
703
-
754
+
704
755
  /**
705
756
  * Graph traversal key method.
706
757
  * @param {...Object} args
@@ -710,7 +761,7 @@ class GraphTraversal extends Traversal {
710
761
  this.bytecode.addStep('key', args);
711
762
  return this;
712
763
  }
713
-
764
+
714
765
  /**
715
766
  * Graph traversal label method.
716
767
  * @param {...Object} args
@@ -720,7 +771,7 @@ class GraphTraversal extends Traversal {
720
771
  this.bytecode.addStep('label', args);
721
772
  return this;
722
773
  }
723
-
774
+
724
775
  /**
725
776
  * Graph traversal limit method.
726
777
  * @param {...Object} args
@@ -730,7 +781,7 @@ class GraphTraversal extends Traversal {
730
781
  this.bytecode.addStep('limit', args);
731
782
  return this;
732
783
  }
733
-
784
+
734
785
  /**
735
786
  * Graph traversal local method.
736
787
  * @param {...Object} args
@@ -740,7 +791,7 @@ class GraphTraversal extends Traversal {
740
791
  this.bytecode.addStep('local', args);
741
792
  return this;
742
793
  }
743
-
794
+
744
795
  /**
745
796
  * Graph traversal loops method.
746
797
  * @param {...Object} args
@@ -750,7 +801,7 @@ class GraphTraversal extends Traversal {
750
801
  this.bytecode.addStep('loops', args);
751
802
  return this;
752
803
  }
753
-
804
+
754
805
  /**
755
806
  * Graph traversal map method.
756
807
  * @param {...Object} args
@@ -760,7 +811,7 @@ class GraphTraversal extends Traversal {
760
811
  this.bytecode.addStep('map', args);
761
812
  return this;
762
813
  }
763
-
814
+
764
815
  /**
765
816
  * Graph traversal match method.
766
817
  * @param {...Object} args
@@ -770,7 +821,7 @@ class GraphTraversal extends Traversal {
770
821
  this.bytecode.addStep('match', args);
771
822
  return this;
772
823
  }
773
-
824
+
774
825
  /**
775
826
  * Graph traversal math method.
776
827
  * @param {...Object} args
@@ -780,7 +831,7 @@ class GraphTraversal extends Traversal {
780
831
  this.bytecode.addStep('math', args);
781
832
  return this;
782
833
  }
783
-
834
+
784
835
  /**
785
836
  * Graph traversal max method.
786
837
  * @param {...Object} args
@@ -790,7 +841,7 @@ class GraphTraversal extends Traversal {
790
841
  this.bytecode.addStep('max', args);
791
842
  return this;
792
843
  }
793
-
844
+
794
845
  /**
795
846
  * Graph traversal mean method.
796
847
  * @param {...Object} args
@@ -800,7 +851,7 @@ class GraphTraversal extends Traversal {
800
851
  this.bytecode.addStep('mean', args);
801
852
  return this;
802
853
  }
803
-
854
+
804
855
  /**
805
856
  * Graph traversal min method.
806
857
  * @param {...Object} args
@@ -810,7 +861,7 @@ class GraphTraversal extends Traversal {
810
861
  this.bytecode.addStep('min', args);
811
862
  return this;
812
863
  }
813
-
864
+
814
865
  /**
815
866
  * Graph traversal none method.
816
867
  * @param {...Object} args
@@ -820,7 +871,7 @@ class GraphTraversal extends Traversal {
820
871
  this.bytecode.addStep('none', args);
821
872
  return this;
822
873
  }
823
-
874
+
824
875
  /**
825
876
  * Graph traversal not method.
826
877
  * @param {...Object} args
@@ -830,7 +881,7 @@ class GraphTraversal extends Traversal {
830
881
  this.bytecode.addStep('not', args);
831
882
  return this;
832
883
  }
833
-
884
+
834
885
  /**
835
886
  * Graph traversal option method.
836
887
  * @param {...Object} args
@@ -840,7 +891,7 @@ class GraphTraversal extends Traversal {
840
891
  this.bytecode.addStep('option', args);
841
892
  return this;
842
893
  }
843
-
894
+
844
895
  /**
845
896
  * Graph traversal optional method.
846
897
  * @param {...Object} args
@@ -850,7 +901,7 @@ class GraphTraversal extends Traversal {
850
901
  this.bytecode.addStep('optional', args);
851
902
  return this;
852
903
  }
853
-
904
+
854
905
  /**
855
906
  * Graph traversal or method.
856
907
  * @param {...Object} args
@@ -860,7 +911,7 @@ class GraphTraversal extends Traversal {
860
911
  this.bytecode.addStep('or', args);
861
912
  return this;
862
913
  }
863
-
914
+
864
915
  /**
865
916
  * Graph traversal order method.
866
917
  * @param {...Object} args
@@ -870,7 +921,7 @@ class GraphTraversal extends Traversal {
870
921
  this.bytecode.addStep('order', args);
871
922
  return this;
872
923
  }
873
-
924
+
874
925
  /**
875
926
  * Graph traversal otherV method.
876
927
  * @param {...Object} args
@@ -880,7 +931,7 @@ class GraphTraversal extends Traversal {
880
931
  this.bytecode.addStep('otherV', args);
881
932
  return this;
882
933
  }
883
-
934
+
884
935
  /**
885
936
  * Graph traversal out method.
886
937
  * @param {...Object} args
@@ -890,7 +941,7 @@ class GraphTraversal extends Traversal {
890
941
  this.bytecode.addStep('out', args);
891
942
  return this;
892
943
  }
893
-
944
+
894
945
  /**
895
946
  * Graph traversal outE method.
896
947
  * @param {...Object} args
@@ -900,7 +951,7 @@ class GraphTraversal extends Traversal {
900
951
  this.bytecode.addStep('outE', args);
901
952
  return this;
902
953
  }
903
-
954
+
904
955
  /**
905
956
  * Graph traversal outV method.
906
957
  * @param {...Object} args
@@ -910,7 +961,7 @@ class GraphTraversal extends Traversal {
910
961
  this.bytecode.addStep('outV', args);
911
962
  return this;
912
963
  }
913
-
964
+
914
965
  /**
915
966
  * Graph traversal pageRank method.
916
967
  * @param {...Object} args
@@ -920,7 +971,7 @@ class GraphTraversal extends Traversal {
920
971
  this.bytecode.addStep('pageRank', args);
921
972
  return this;
922
973
  }
923
-
974
+
924
975
  /**
925
976
  * Graph traversal path method.
926
977
  * @param {...Object} args
@@ -930,7 +981,7 @@ class GraphTraversal extends Traversal {
930
981
  this.bytecode.addStep('path', args);
931
982
  return this;
932
983
  }
933
-
984
+
934
985
  /**
935
986
  * Graph traversal peerPressure method.
936
987
  * @param {...Object} args
@@ -940,7 +991,7 @@ class GraphTraversal extends Traversal {
940
991
  this.bytecode.addStep('peerPressure', args);
941
992
  return this;
942
993
  }
943
-
994
+
944
995
  /**
945
996
  * Graph traversal profile method.
946
997
  * @param {...Object} args
@@ -950,7 +1001,7 @@ class GraphTraversal extends Traversal {
950
1001
  this.bytecode.addStep('profile', args);
951
1002
  return this;
952
1003
  }
953
-
1004
+
954
1005
  /**
955
1006
  * Graph traversal program method.
956
1007
  * @param {...Object} args
@@ -960,7 +1011,7 @@ class GraphTraversal extends Traversal {
960
1011
  this.bytecode.addStep('program', args);
961
1012
  return this;
962
1013
  }
963
-
1014
+
964
1015
  /**
965
1016
  * Graph traversal project method.
966
1017
  * @param {...Object} args
@@ -970,7 +1021,7 @@ class GraphTraversal extends Traversal {
970
1021
  this.bytecode.addStep('project', args);
971
1022
  return this;
972
1023
  }
973
-
1024
+
974
1025
  /**
975
1026
  * Graph traversal properties method.
976
1027
  * @param {...Object} args
@@ -980,7 +1031,7 @@ class GraphTraversal extends Traversal {
980
1031
  this.bytecode.addStep('properties', args);
981
1032
  return this;
982
1033
  }
983
-
1034
+
984
1035
  /**
985
1036
  * Graph traversal property method.
986
1037
  * @param {...Object} args
@@ -990,7 +1041,7 @@ class GraphTraversal extends Traversal {
990
1041
  this.bytecode.addStep('property', args);
991
1042
  return this;
992
1043
  }
993
-
1044
+
994
1045
  /**
995
1046
  * Graph traversal propertyMap method.
996
1047
  * @param {...Object} args
@@ -1000,7 +1051,7 @@ class GraphTraversal extends Traversal {
1000
1051
  this.bytecode.addStep('propertyMap', args);
1001
1052
  return this;
1002
1053
  }
1003
-
1054
+
1004
1055
  /**
1005
1056
  * Graph traversal range method.
1006
1057
  * @param {...Object} args
@@ -1010,7 +1061,7 @@ class GraphTraversal extends Traversal {
1010
1061
  this.bytecode.addStep('range', args);
1011
1062
  return this;
1012
1063
  }
1013
-
1064
+
1014
1065
  /**
1015
1066
  * Graph traversal read method.
1016
1067
  * @param {...Object} args
@@ -1020,7 +1071,7 @@ class GraphTraversal extends Traversal {
1020
1071
  this.bytecode.addStep('read', args);
1021
1072
  return this;
1022
1073
  }
1023
-
1074
+
1024
1075
  /**
1025
1076
  * Graph traversal repeat method.
1026
1077
  * @param {...Object} args
@@ -1030,7 +1081,7 @@ class GraphTraversal extends Traversal {
1030
1081
  this.bytecode.addStep('repeat', args);
1031
1082
  return this;
1032
1083
  }
1033
-
1084
+
1034
1085
  /**
1035
1086
  * Graph traversal sack method.
1036
1087
  * @param {...Object} args
@@ -1040,7 +1091,7 @@ class GraphTraversal extends Traversal {
1040
1091
  this.bytecode.addStep('sack', args);
1041
1092
  return this;
1042
1093
  }
1043
-
1094
+
1044
1095
  /**
1045
1096
  * Graph traversal sample method.
1046
1097
  * @param {...Object} args
@@ -1050,7 +1101,7 @@ class GraphTraversal extends Traversal {
1050
1101
  this.bytecode.addStep('sample', args);
1051
1102
  return this;
1052
1103
  }
1053
-
1104
+
1054
1105
  /**
1055
1106
  * Graph traversal select method.
1056
1107
  * @param {...Object} args
@@ -1060,7 +1111,7 @@ class GraphTraversal extends Traversal {
1060
1111
  this.bytecode.addStep('select', args);
1061
1112
  return this;
1062
1113
  }
1063
-
1114
+
1064
1115
  /**
1065
1116
  * Graph traversal shortestPath method.
1066
1117
  * @param {...Object} args
@@ -1070,7 +1121,7 @@ class GraphTraversal extends Traversal {
1070
1121
  this.bytecode.addStep('shortestPath', args);
1071
1122
  return this;
1072
1123
  }
1073
-
1124
+
1074
1125
  /**
1075
1126
  * Graph traversal sideEffect method.
1076
1127
  * @param {...Object} args
@@ -1080,7 +1131,7 @@ class GraphTraversal extends Traversal {
1080
1131
  this.bytecode.addStep('sideEffect', args);
1081
1132
  return this;
1082
1133
  }
1083
-
1134
+
1084
1135
  /**
1085
1136
  * Graph traversal simplePath method.
1086
1137
  * @param {...Object} args
@@ -1090,7 +1141,7 @@ class GraphTraversal extends Traversal {
1090
1141
  this.bytecode.addStep('simplePath', args);
1091
1142
  return this;
1092
1143
  }
1093
-
1144
+
1094
1145
  /**
1095
1146
  * Graph traversal skip method.
1096
1147
  * @param {...Object} args
@@ -1100,7 +1151,7 @@ class GraphTraversal extends Traversal {
1100
1151
  this.bytecode.addStep('skip', args);
1101
1152
  return this;
1102
1153
  }
1103
-
1154
+
1104
1155
  /**
1105
1156
  * Graph traversal store method.
1106
1157
  * @param {...Object} args
@@ -1110,7 +1161,7 @@ class GraphTraversal extends Traversal {
1110
1161
  this.bytecode.addStep('store', args);
1111
1162
  return this;
1112
1163
  }
1113
-
1164
+
1114
1165
  /**
1115
1166
  * Graph traversal subgraph method.
1116
1167
  * @param {...Object} args
@@ -1120,7 +1171,7 @@ class GraphTraversal extends Traversal {
1120
1171
  this.bytecode.addStep('subgraph', args);
1121
1172
  return this;
1122
1173
  }
1123
-
1174
+
1124
1175
  /**
1125
1176
  * Graph traversal sum method.
1126
1177
  * @param {...Object} args
@@ -1130,7 +1181,7 @@ class GraphTraversal extends Traversal {
1130
1181
  this.bytecode.addStep('sum', args);
1131
1182
  return this;
1132
1183
  }
1133
-
1184
+
1134
1185
  /**
1135
1186
  * Graph traversal tail method.
1136
1187
  * @param {...Object} args
@@ -1140,7 +1191,7 @@ class GraphTraversal extends Traversal {
1140
1191
  this.bytecode.addStep('tail', args);
1141
1192
  return this;
1142
1193
  }
1143
-
1194
+
1144
1195
  /**
1145
1196
  * Graph traversal timeLimit method.
1146
1197
  * @param {...Object} args
@@ -1150,7 +1201,7 @@ class GraphTraversal extends Traversal {
1150
1201
  this.bytecode.addStep('timeLimit', args);
1151
1202
  return this;
1152
1203
  }
1153
-
1204
+
1154
1205
  /**
1155
1206
  * Graph traversal times method.
1156
1207
  * @param {...Object} args
@@ -1160,7 +1211,7 @@ class GraphTraversal extends Traversal {
1160
1211
  this.bytecode.addStep('times', args);
1161
1212
  return this;
1162
1213
  }
1163
-
1214
+
1164
1215
  /**
1165
1216
  * Graph traversal to method.
1166
1217
  * @param {...Object} args
@@ -1170,7 +1221,7 @@ class GraphTraversal extends Traversal {
1170
1221
  this.bytecode.addStep('to', args);
1171
1222
  return this;
1172
1223
  }
1173
-
1224
+
1174
1225
  /**
1175
1226
  * Graph traversal toE method.
1176
1227
  * @param {...Object} args
@@ -1180,7 +1231,7 @@ class GraphTraversal extends Traversal {
1180
1231
  this.bytecode.addStep('toE', args);
1181
1232
  return this;
1182
1233
  }
1183
-
1234
+
1184
1235
  /**
1185
1236
  * Graph traversal toV method.
1186
1237
  * @param {...Object} args
@@ -1190,7 +1241,7 @@ class GraphTraversal extends Traversal {
1190
1241
  this.bytecode.addStep('toV', args);
1191
1242
  return this;
1192
1243
  }
1193
-
1244
+
1194
1245
  /**
1195
1246
  * Graph traversal tree method.
1196
1247
  * @param {...Object} args
@@ -1200,7 +1251,7 @@ class GraphTraversal extends Traversal {
1200
1251
  this.bytecode.addStep('tree', args);
1201
1252
  return this;
1202
1253
  }
1203
-
1254
+
1204
1255
  /**
1205
1256
  * Graph traversal unfold method.
1206
1257
  * @param {...Object} args
@@ -1210,7 +1261,7 @@ class GraphTraversal extends Traversal {
1210
1261
  this.bytecode.addStep('unfold', args);
1211
1262
  return this;
1212
1263
  }
1213
-
1264
+
1214
1265
  /**
1215
1266
  * Graph traversal union method.
1216
1267
  * @param {...Object} args
@@ -1220,7 +1271,7 @@ class GraphTraversal extends Traversal {
1220
1271
  this.bytecode.addStep('union', args);
1221
1272
  return this;
1222
1273
  }
1223
-
1274
+
1224
1275
  /**
1225
1276
  * Graph traversal until method.
1226
1277
  * @param {...Object} args
@@ -1230,7 +1281,7 @@ class GraphTraversal extends Traversal {
1230
1281
  this.bytecode.addStep('until', args);
1231
1282
  return this;
1232
1283
  }
1233
-
1284
+
1234
1285
  /**
1235
1286
  * Graph traversal value method.
1236
1287
  * @param {...Object} args
@@ -1240,7 +1291,7 @@ class GraphTraversal extends Traversal {
1240
1291
  this.bytecode.addStep('value', args);
1241
1292
  return this;
1242
1293
  }
1243
-
1294
+
1244
1295
  /**
1245
1296
  * Graph traversal valueMap method.
1246
1297
  * @param {...Object} args
@@ -1250,7 +1301,7 @@ class GraphTraversal extends Traversal {
1250
1301
  this.bytecode.addStep('valueMap', args);
1251
1302
  return this;
1252
1303
  }
1253
-
1304
+
1254
1305
  /**
1255
1306
  * Graph traversal values method.
1256
1307
  * @param {...Object} args
@@ -1260,7 +1311,7 @@ class GraphTraversal extends Traversal {
1260
1311
  this.bytecode.addStep('values', args);
1261
1312
  return this;
1262
1313
  }
1263
-
1314
+
1264
1315
  /**
1265
1316
  * Graph traversal where method.
1266
1317
  * @param {...Object} args
@@ -1270,7 +1321,7 @@ class GraphTraversal extends Traversal {
1270
1321
  this.bytecode.addStep('where', args);
1271
1322
  return this;
1272
1323
  }
1273
-
1324
+
1274
1325
  /**
1275
1326
  * Graph traversal with method.
1276
1327
  * @param {...Object} args
@@ -1280,7 +1331,7 @@ class GraphTraversal extends Traversal {
1280
1331
  this.bytecode.addStep('with', args);
1281
1332
  return this;
1282
1333
  }
1283
-
1334
+
1284
1335
  /**
1285
1336
  * Graph traversal write method.
1286
1337
  * @param {...Object} args
@@ -1290,7 +1341,6 @@ class GraphTraversal extends Traversal {
1290
1341
  this.bytecode.addStep('write', args);
1291
1342
  return this;
1292
1343
  }
1293
-
1294
1344
  }
1295
1345
 
1296
1346
  function callOnEmptyTraversal(fnName, args) {
@@ -1392,11 +1442,11 @@ const statics = {
1392
1442
  value: (...args) => callOnEmptyTraversal('value', args),
1393
1443
  valueMap: (...args) => callOnEmptyTraversal('valueMap', args),
1394
1444
  values: (...args) => callOnEmptyTraversal('values', args),
1395
- where: (...args) => callOnEmptyTraversal('where', args)
1445
+ where: (...args) => callOnEmptyTraversal('where', args),
1396
1446
  };
1397
1447
 
1398
1448
  module.exports = {
1399
1449
  GraphTraversal,
1400
1450
  GraphTraversalSource,
1401
- statics
1402
- };
1451
+ statics,
1452
+ };