gremlin 3.5.1 → 3.5.4

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 (128) hide show
  1. package/.eslintrc.js +155 -0
  2. package/.prettierrc.js +29 -0
  3. package/Gruntfile.js +15 -16
  4. package/doc/AnonymousTraversalSource.html +5 -5
  5. package/doc/Authenticator.html +2 -2
  6. package/doc/Bytecode.html +7 -7
  7. package/doc/Client.html +138 -64
  8. package/doc/Connection.html +93 -9
  9. package/doc/DriverRemoteConnection.html +11 -11
  10. package/doc/EdgeLabelVerificationStrategy.html +3 -3
  11. package/doc/Graph.html +2 -2
  12. package/doc/GraphSON2Reader.html +4 -4
  13. package/doc/GraphSON2Writer.html +3 -3
  14. package/doc/GraphSON3Reader.html +3 -3
  15. package/doc/GraphSON3Writer.html +3 -3
  16. package/doc/GraphTraversal.html +107 -107
  17. package/doc/GraphTraversalSource.html +19 -19
  18. package/doc/HaltedTraverserStrategy.html +3 -3
  19. package/doc/MatchAlgorithmStrategy.html +3 -3
  20. package/doc/P.html +13 -13
  21. package/doc/PartitionStrategy.html +3 -3
  22. package/doc/Path.html +2 -2
  23. package/doc/PlainTextSaslAuthenticator.html +2 -2
  24. package/doc/ProductiveByStrategy.html +288 -0
  25. package/doc/RemoteConnection.html +10 -10
  26. package/doc/RemoteStrategy.html +4 -4
  27. package/doc/RemoteTraversal.html +3 -3
  28. package/doc/ReservedKeysVerificationStrategy.html +3 -3
  29. package/doc/ResponseError.html +2 -2
  30. package/doc/ResultSet.html +7 -7
  31. package/doc/SaslAuthenticator.html +2 -2
  32. package/doc/SaslMechanismBase.html +2 -2
  33. package/doc/SaslMechanismPlain.html +6 -6
  34. package/doc/SeedStrategy.html +288 -0
  35. package/doc/SubgraphStrategy.html +3 -3
  36. package/doc/TextP.html +10 -10
  37. package/doc/Transaction.html +6 -6
  38. package/doc/Translator.html +198 -4
  39. package/doc/TraversalStrategies.html +5 -5
  40. package/doc/TraversalStrategy.html +3 -3
  41. package/doc/TypeSerializer.html +2 -2
  42. package/doc/driver_auth_authenticator.js.html +4 -4
  43. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +3 -3
  44. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +26 -17
  45. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +7 -7
  46. package/doc/driver_auth_sasl-authenticator.js.html +3 -3
  47. package/doc/driver_client.js.html +73 -23
  48. package/doc/driver_connection.js.html +134 -92
  49. package/doc/driver_driver-remote-connection.js.html +12 -11
  50. package/doc/driver_remote-connection.js.html +4 -5
  51. package/doc/driver_response-error.js.html +5 -4
  52. package/doc/driver_result-set.js.html +4 -4
  53. package/doc/global.html +264 -3
  54. package/doc/index.html +2 -2
  55. package/doc/module.exports.html +301 -0
  56. package/doc/process_anonymous-traversal.js.html +4 -4
  57. package/doc/process_bytecode.js.html +11 -9
  58. package/doc/process_graph-traversal.js.html +194 -143
  59. package/doc/process_transaction.js.html +16 -9
  60. package/doc/process_translator.js.html +53 -37
  61. package/doc/process_traversal-strategy.js.html +70 -53
  62. package/doc/process_traversal.js.html +101 -108
  63. package/doc/structure_graph.js.html +7 -7
  64. package/doc/structure_io_binary_internals_DataType.js.html +148 -0
  65. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +131 -0
  66. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +134 -0
  67. package/doc/structure_io_graph-serializer.js.html +65 -18
  68. package/doc/structure_io_type-serializers.js.html +86 -89
  69. package/index.js +5 -5
  70. package/lib/driver/auth/authenticator.js +2 -2
  71. package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
  72. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
  73. package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
  74. package/lib/driver/auth/sasl-authenticator.js +1 -1
  75. package/lib/driver/client.js +71 -21
  76. package/lib/driver/connection.js +132 -90
  77. package/lib/driver/driver-remote-connection.js +10 -9
  78. package/lib/driver/remote-connection.js +2 -3
  79. package/lib/driver/response-error.js +2 -2
  80. package/lib/driver/result-set.js +1 -2
  81. package/lib/process/anonymous-traversal.js +1 -2
  82. package/lib/process/bytecode.js +9 -7
  83. package/lib/process/graph-traversal.js +191 -141
  84. package/lib/process/transaction.js +13 -7
  85. package/lib/process/translator.js +50 -35
  86. package/lib/process/traversal-strategy.js +67 -51
  87. package/lib/process/traversal.js +99 -106
  88. package/lib/structure/graph.js +5 -5
  89. package/lib/structure/io/binary/GraphBinary.js +109 -0
  90. package/lib/structure/io/binary/internals/AnySerializer.js +95 -0
  91. package/lib/structure/io/binary/internals/ArraySerializer.js +135 -0
  92. package/lib/structure/io/binary/internals/BigIntegerSerializer.js +151 -0
  93. package/lib/structure/io/binary/internals/BooleanSerializer.js +103 -0
  94. package/lib/structure/io/binary/internals/BulkSetSerializer.js +124 -0
  95. package/lib/structure/io/binary/internals/ByteBufferSerializer.js +124 -0
  96. package/lib/structure/io/binary/internals/ByteSerializer.js +95 -0
  97. package/lib/structure/io/binary/internals/BytecodeSerializer.js +249 -0
  98. package/lib/structure/io/binary/internals/DataType.js +97 -0
  99. package/lib/structure/io/binary/internals/DateSerializer.js +103 -0
  100. package/lib/structure/io/binary/internals/DoubleSerializer.js +99 -0
  101. package/lib/structure/io/binary/internals/EdgeSerializer.js +215 -0
  102. package/lib/structure/io/binary/internals/EnumSerializer.js +148 -0
  103. package/lib/structure/io/binary/internals/FloatSerializer.js +99 -0
  104. package/lib/structure/io/binary/internals/GraphBinaryReader.js +80 -0
  105. package/lib/structure/io/binary/internals/GraphBinaryWriter.js +83 -0
  106. package/lib/structure/io/binary/internals/IntSerializer.js +112 -0
  107. package/lib/structure/io/binary/internals/LambdaSerializer.js +70 -0
  108. package/lib/structure/io/binary/internals/LongSerializer.js +107 -0
  109. package/lib/structure/io/binary/internals/LongSerializerNg.js +102 -0
  110. package/lib/structure/io/binary/internals/MapSerializer.js +153 -0
  111. package/lib/structure/io/binary/internals/NumberSerializationStrategy.js +68 -0
  112. package/lib/structure/io/binary/internals/PSerializer.js +151 -0
  113. package/lib/structure/io/binary/internals/PathSerializer.js +123 -0
  114. package/lib/structure/io/binary/internals/PropertySerializer.js +141 -0
  115. package/lib/structure/io/binary/internals/ShortSerializer.js +99 -0
  116. package/lib/structure/io/binary/internals/StringSerializer.js +114 -0
  117. package/lib/structure/io/binary/internals/TextPSerializer.js +145 -0
  118. package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +72 -0
  119. package/lib/structure/io/binary/internals/TraverserSerializer.js +123 -0
  120. package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +75 -0
  121. package/lib/structure/io/binary/internals/UuidSerializer.js +119 -0
  122. package/lib/structure/io/binary/internals/VertexPropertySerializer.js +172 -0
  123. package/lib/structure/io/binary/internals/VertexSerializer.js +135 -0
  124. package/lib/structure/io/binary/internals/utils.js +59 -0
  125. package/lib/structure/io/graph-serializer.js +62 -16
  126. package/lib/structure/io/type-serializers.js +84 -87
  127. package/lib/utils.js +15 -10
  128. package/package.json +21 -8
@@ -40,14 +40,19 @@ class Transaction {
40
40
  */
41
41
  begin() {
42
42
  if (this._sessionBasedConnection) {
43
- throw new Error("Transaction already started on this object");
43
+ throw new Error('Transaction already started on this object');
44
44
  }
45
45
 
46
46
  this._sessionBasedConnection = this._g.remoteConnection.createSession();
47
47
  const traversalStrategy = new TraversalStrategies();
48
48
  traversalStrategy.addStrategy(new remote.RemoteStrategy(this._sessionBasedConnection));
49
- return new this._g.graphTraversalSourceClass(this._g.graph, traversalStrategy, new Bytecode(this._g.bytecode),
50
- this._g.graphTraversalSourceClass, this._g.graphTraversalClass);
49
+ return new this._g.graphTraversalSourceClass(
50
+ this._g.graph,
51
+ traversalStrategy,
52
+ new Bytecode(this._g.bytecode),
53
+ this._g.graphTraversalSourceClass,
54
+ this._g.graphTraversalClass,
55
+ );
51
56
  }
52
57
 
53
58
  /**
@@ -69,18 +74,19 @@ class Transaction {
69
74
  * @returns {Boolean}
70
75
  */
71
76
  get isOpen() {
72
- this._sessionBasedConnection.isOpen;
77
+ return this._sessionBasedConnection.isOpen;
73
78
  }
74
79
 
75
80
  /**
76
81
  * @returns {Promise}
77
82
  */
78
83
  close() {
79
- if (this._sessionBasedConnection)
84
+ if (this._sessionBasedConnection) {
80
85
  this._sessionBasedConnection.close();
86
+ }
81
87
  }
82
88
  }
83
89
 
84
90
  module.exports = {
85
- Transaction
86
- };
91
+ Transaction,
92
+ };
@@ -34,7 +34,7 @@ class Translator {
34
34
  }
35
35
 
36
36
  getTargetLanguage() {
37
- return "gremlin-groovy";
37
+ return 'gremlin-groovy';
38
38
  }
39
39
 
40
40
  of(traversalSource) {
@@ -44,13 +44,14 @@ class Translator {
44
44
  /**
45
45
  * Returns a script representation of the given bytecode instructions.
46
46
  * @param {Object} bytecodeOrTraversal The traversal or bytecode of a traversal containing step instructions.
47
+ * @param {boolean} child Determines if a traversal object should be treated as an anonymous child or if it is a spawn from "g"
47
48
  * @returns {string} Gremlin-Groovy script
48
49
  */
49
50
  translate(bytecodeOrTraversal, child = false) {
50
- let script = child ? "__" : this._traversalSource;
51
+ let script = child ? '__' : this._traversalSource;
51
52
  const bc = bytecodeOrTraversal instanceof Bytecode ? bytecodeOrTraversal : bytecodeOrTraversal.getBytecode();
52
53
 
53
- let instructions = bc.stepInstructions;
54
+ const instructions = bc.stepInstructions;
54
55
 
55
56
  // build the script from the glv instructions.
56
57
  for (let i = 0; i < instructions.length; i++) {
@@ -63,44 +64,58 @@ class Translator {
63
64
  script += ', ';
64
65
  }
65
66
 
66
- if (Object(params[k]) === params[k]) {
67
- if (params[k] instanceof Traversal) {
68
- script += this.translate(params[k].getBytecode(), true);
69
- } else if (params[k].toString() === '[object Object]') {
70
- Object.keys(params[k]).forEach(function (key, index) {
71
- if (index > 0) script += ', ';
72
- script += '(\'' + key + '\', ';
73
- if (params[k][key] instanceof String || typeof params[k][key] === 'string') {
74
- script += '\'' + params[k][key] + '\'';
75
- } else {
76
- script += params[k][key];
77
- }
78
- script += ')';
79
- });
80
- } else if (Array.isArray(params[k])) {
81
- const parts = [];
82
- for (const param of params[k]) {
83
- parts.push(translate(param.getBytecode(), true));
84
- }
85
- script += parts.join(",");
86
- } else {
87
- script += params[k].toString();
88
- }
89
- } else if (params[k] === undefined) {
90
- script += '';
91
- } else if (typeof params[k] === 'number' || typeof params[k] === 'boolean') {
92
- script += params[k];
93
- } else {
94
- script += '\'' + params[k] + '\'';
95
- }
67
+ script += this.convert(params[k]);
96
68
  }
97
69
  }
98
70
 
99
71
  script += ')';
100
72
  }
101
-
73
+
74
+ return script;
75
+ }
76
+
77
+ /**
78
+ * Converts an object to a Gremlin script representation.
79
+ * @param {Object} anyObject The object to convert to a script representation
80
+ * @returns {string} The Gremlin script representation
81
+ */
82
+ convert(anyObject) {
83
+ let script = '';
84
+ if (Object(anyObject) === anyObject) {
85
+ if (anyObject instanceof Traversal) {
86
+ script += this.translate(anyObject.getBytecode(), true);
87
+ } else if (anyObject.toString() === '[object Object]') {
88
+ Object.keys(anyObject).forEach(function (key, index) {
89
+ if (index > 0) {
90
+ script += ', ';
91
+ }
92
+ script += `('${key}', `;
93
+ if (anyObject[key] instanceof String || typeof anyObject[key] === 'string') {
94
+ script += `'${anyObject[key]}'`;
95
+ } else {
96
+ script += anyObject[key];
97
+ }
98
+ script += ')';
99
+ });
100
+ } else if (Array.isArray(anyObject)) {
101
+ const parts = [];
102
+ for (const item of anyObject) {
103
+ parts.push(this.convert(item));
104
+ }
105
+ script += '[' + parts.join(', ') + ']';
106
+ } else {
107
+ script += anyObject.toString();
108
+ }
109
+ } else if (anyObject === undefined) {
110
+ script += '';
111
+ } else if (typeof anyObject === 'number' || typeof anyObject === 'boolean') {
112
+ script += anyObject;
113
+ } else {
114
+ script += `'${anyObject}'`;
115
+ }
116
+
102
117
  return script;
103
118
  }
104
119
  }
105
120
 
106
- module.exports = Translator;
121
+ module.exports = Translator;
@@ -34,8 +34,7 @@ class TraversalStrategies {
34
34
  if (parent) {
35
35
  // Clone the strategies
36
36
  this.strategies = [...parent.strategies];
37
- }
38
- else {
37
+ } else {
39
38
  this.strategies = [];
40
39
  }
41
40
  }
@@ -47,7 +46,7 @@ class TraversalStrategies {
47
46
 
48
47
  /** @param {TraversalStrategy} strategy */
49
48
  removeStrategy(strategy) {
50
- const idx = this.strategies.findIndex(s => s.fqcn === strategy.fqcn);
49
+ const idx = this.strategies.findIndex((s) => s.fqcn === strategy.fqcn);
51
50
  if (idx !== -1) {
52
51
  return this.strategies.splice(idx, 1)[0];
53
52
  }
@@ -61,15 +60,15 @@ class TraversalStrategies {
61
60
  */
62
61
  applyStrategies(traversal) {
63
62
  // Apply all strategies serially
64
- return this.strategies.reduce((promise, strategy) => {
65
- return promise.then(() => strategy.apply(traversal));
66
- }, Promise.resolve());
63
+ return this.strategies.reduce(
64
+ (promise, strategy) => promise.then(() => strategy.apply(traversal)),
65
+ Promise.resolve(),
66
+ );
67
67
  }
68
68
  }
69
69
 
70
70
  /** @abstract */
71
71
  class TraversalStrategy {
72
-
73
72
  /**
74
73
  * @param {String} fqcn fully qualified class name in Java of the strategy
75
74
  * @param {Object} configuration for the strategy
@@ -84,38 +83,36 @@ class TraversalStrategy {
84
83
  * @param {Traversal} traversal
85
84
  * @returns {Promise}
86
85
  */
87
- apply(traversal) {
88
-
89
- }
86
+ apply(traversal) {}
90
87
  }
91
88
 
92
89
  class ConnectiveStrategy extends TraversalStrategy {
93
90
  constructor() {
94
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy");
91
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy');
95
92
  }
96
93
  }
97
94
 
98
95
  class ElementIdStrategy extends TraversalStrategy {
99
96
  constructor() {
100
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy");
97
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy');
101
98
  }
102
99
  }
103
100
 
104
101
  class HaltedTraverserStrategy extends TraversalStrategy {
105
-
106
102
  /**
107
103
  * @param {String} haltedTraverserFactory full qualified class name in Java of a {@code HaltedTraverserFactory} implementation
108
104
  */
109
105
  constructor(haltedTraverserFactory) {
110
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy");
111
- if (haltedTraverserFactory !== undefined)
112
- this.configuration["haltedTraverserFactory"] = haltedTraverserFactory;
106
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy');
107
+ if (haltedTraverserFactory !== undefined) {
108
+ this.configuration['haltedTraverserFactory'] = haltedTraverserFactory;
109
+ }
113
110
  }
114
111
  }
115
112
 
116
113
  class OptionsStrategy extends TraversalStrategy {
117
114
  constructor(options) {
118
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy", options);
115
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy', options);
119
116
  }
120
117
  }
121
118
 
@@ -128,7 +125,7 @@ class PartitionStrategy extends TraversalStrategy {
128
125
  * @param {boolean} [options.includeMetaProperties] determines if meta-properties should be included in partitioning defaulting to false
129
126
  */
130
127
  constructor(options) {
131
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy", options);
128
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy', options);
132
129
  }
133
130
  }
134
131
 
@@ -141,20 +138,32 @@ class SubgraphStrategy extends TraversalStrategy {
141
138
  * @param {boolean} [options.checkAdjacentVertices] enables the strategy to apply the {@code vertices} filter to the adjacent vertices of an edge.
142
139
  */
143
140
  constructor(options) {
144
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy", options);
145
- if (this.configuration.vertices instanceof Traversal)
141
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy', options);
142
+ if (this.configuration.vertices instanceof Traversal) {
146
143
  this.configuration.vertices = this.configuration.vertices.bytecode;
147
- if (this.configuration.edges instanceof Traversal)
144
+ }
145
+ if (this.configuration.edges instanceof Traversal) {
148
146
  this.configuration.edges = this.configuration.edges.bytecode;
149
- if (this.configuration.vertexProperties instanceof Traversal)
147
+ }
148
+ if (this.configuration.vertexProperties instanceof Traversal) {
150
149
  this.configuration.vertexProperties = this.configuration.vertexProperties.bytecode;
150
+ }
151
151
  }
152
152
  }
153
153
 
154
- class VertexProgramStrategy extends TraversalStrategy {
154
+ class ProductiveByStrategy extends TraversalStrategy {
155
+ /**
156
+ * @param {Object} [options]
157
+ * @param {Array<String>} [options.productiveKeys] set of keys that will always be productive
158
+ */
159
+ constructor(options) {
160
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy', options);
161
+ }
162
+ }
155
163
 
164
+ class VertexProgramStrategy extends TraversalStrategy {
156
165
  constructor(options) {
157
- super("org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy", options);
166
+ super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy', options);
158
167
  }
159
168
  }
160
169
 
@@ -163,105 +172,106 @@ class MatchAlgorithmStrategy extends TraversalStrategy {
163
172
  * @param matchAlgorithm
164
173
  */
165
174
  constructor(matchAlgorithm) {
166
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy");
167
- if (matchAlgorithm !== undefined)
168
- this.configuration["matchAlgorithm"] = matchAlgorithm;
175
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy');
176
+ if (matchAlgorithm !== undefined) {
177
+ this.configuration['matchAlgorithm'] = matchAlgorithm;
178
+ }
169
179
  }
170
180
  }
171
181
 
172
182
  class AdjacentToIncidentStrategy extends TraversalStrategy {
173
183
  constructor() {
174
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy");
184
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy');
175
185
  }
176
186
  }
177
187
 
178
188
  class FilterRankingStrategy extends TraversalStrategy {
179
189
  constructor() {
180
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy");
190
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy');
181
191
  }
182
192
  }
183
193
 
184
194
  class IdentityRemovalStrategy extends TraversalStrategy {
185
195
  constructor() {
186
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy");
196
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy');
187
197
  }
188
198
  }
189
199
 
190
200
  class IncidentToAdjacentStrategy extends TraversalStrategy {
191
201
  constructor() {
192
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy");
202
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy');
193
203
  }
194
204
  }
195
205
 
196
206
  class InlineFilterStrategy extends TraversalStrategy {
197
207
  constructor() {
198
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy");
208
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy');
199
209
  }
200
210
  }
201
211
 
202
212
  class LazyBarrierStrategy extends TraversalStrategy {
203
213
  constructor() {
204
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy");
214
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy');
205
215
  }
206
216
  }
207
217
 
208
218
  class MatchPredicateStrategy extends TraversalStrategy {
209
219
  constructor() {
210
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy");
220
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy');
211
221
  }
212
222
  }
213
223
 
214
224
  class OrderLimitStrategy extends TraversalStrategy {
215
225
  constructor() {
216
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy");
226
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy');
217
227
  }
218
228
  }
219
229
 
220
230
  class PathProcessorStrategy extends TraversalStrategy {
221
231
  constructor() {
222
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy");
232
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy');
223
233
  }
224
234
  }
225
235
 
226
236
  class PathRetractionStrategy extends TraversalStrategy {
227
237
  constructor() {
228
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy");
238
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy');
229
239
  }
230
240
  }
231
241
 
232
242
  class CountStrategy extends TraversalStrategy {
233
243
  constructor() {
234
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy");
244
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy');
235
245
  }
236
246
  }
237
247
 
238
248
  class RepeatUnrollStrategy extends TraversalStrategy {
239
249
  constructor() {
240
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy");
250
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy');
241
251
  }
242
252
  }
243
253
 
244
254
  class GraphFilterStrategy extends TraversalStrategy {
245
255
  constructor() {
246
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy");
256
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy');
247
257
  }
248
258
  }
249
259
 
250
260
  class EarlyLimitStrategy extends TraversalStrategy {
251
261
  constructor() {
252
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy");
262
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy');
253
263
  }
254
264
  }
255
265
 
256
266
  class LambdaRestrictionStrategy extends TraversalStrategy {
257
267
  constructor() {
258
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy");
268
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy');
259
269
  }
260
270
  }
261
271
 
262
272
  class ReadOnlyStrategy extends TraversalStrategy {
263
273
  constructor() {
264
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy");
274
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy');
265
275
  }
266
276
  }
267
277
 
@@ -270,9 +280,11 @@ class EdgeLabelVerificationStrategy extends TraversalStrategy {
270
280
  * @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
271
281
  * @param {boolean} throwException determines if exceptions should be thrown when verifications fails
272
282
  */
273
- constructor(logWarnings = false, throwException=false) {
274
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy",
275
- {logWarnings: logWarnings, throwException: throwException});
283
+ constructor(logWarnings = false, throwException = false) {
284
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
285
+ logWarnings: logWarnings,
286
+ throwException: throwException,
287
+ });
276
288
  }
277
289
  }
278
290
 
@@ -282,9 +294,12 @@ class ReservedKeysVerificationStrategy extends TraversalStrategy {
282
294
  * @param {boolean} throwException determines if exceptions should be thrown when verifications fails
283
295
  * @param {Array<String>} keys the list of reserved keys to verify
284
296
  */
285
- constructor(logWarnings = false, throwException=false, keys=["id", "label"]) {
286
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy",
287
- {logWarnings: logWarnings, throwException: throwException, keys: keys});
297
+ constructor(logWarnings = false, throwException = false, keys = ['id', 'label']) {
298
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReservedKeysVerificationStrategy', {
299
+ logWarnings: logWarnings,
300
+ throwException: throwException,
301
+ keys: keys,
302
+ });
288
303
  }
289
304
  }
290
305
 
@@ -312,6 +327,7 @@ module.exports = {
312
327
  OrderLimitStrategy: OrderLimitStrategy,
313
328
  PathProcessorStrategy: PathProcessorStrategy,
314
329
  PathRetractionStrategy: PathRetractionStrategy,
330
+ ProductiveByStrategy: ProductiveByStrategy,
315
331
  CountStrategy: CountStrategy,
316
332
  RepeatUnrollStrategy: RepeatUnrollStrategy,
317
333
  GraphFilterStrategy: GraphFilterStrategy,
@@ -320,5 +336,5 @@ module.exports = {
320
336
  EdgeLabelVerificationStrategy: EdgeLabelVerificationStrategy,
321
337
  LambdaRestrictionStrategy: LambdaRestrictionStrategy,
322
338
  ReadOnlyStrategy: ReadOnlyStrategy,
323
- ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy
324
- };
339
+ ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy,
340
+ };