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.
- package/.eslintrc.js +154 -0
- package/.prettierrc.js +29 -0
- package/Gruntfile.js +15 -16
- package/doc/AnonymousTraversalSource.html +4 -4
- package/doc/Authenticator.html +1 -1
- package/doc/Bytecode.html +6 -6
- package/doc/Client.html +137 -63
- package/doc/Connection.html +88 -4
- package/doc/DriverRemoteConnection.html +10 -10
- package/doc/EdgeLabelVerificationStrategy.html +1 -1
- package/doc/Graph.html +1 -1
- package/doc/GraphSON2Reader.html +3 -3
- package/doc/GraphSON2Writer.html +2 -2
- package/doc/GraphSON3Reader.html +2 -2
- package/doc/GraphSON3Writer.html +2 -2
- package/doc/GraphTraversal.html +106 -106
- package/doc/GraphTraversalSource.html +18 -18
- package/doc/HaltedTraverserStrategy.html +2 -2
- package/doc/MatchAlgorithmStrategy.html +2 -2
- package/doc/P.html +12 -12
- package/doc/PartitionStrategy.html +2 -2
- package/doc/Path.html +1 -1
- package/doc/PlainTextSaslAuthenticator.html +1 -1
- package/doc/ProductiveByStrategy.html +1 -1
- package/doc/RemoteConnection.html +9 -9
- package/doc/RemoteStrategy.html +3 -3
- package/doc/RemoteTraversal.html +2 -2
- package/doc/ReservedKeysVerificationStrategy.html +2 -2
- package/doc/ResponseError.html +1 -1
- package/doc/ResultSet.html +6 -6
- package/doc/SaslAuthenticator.html +1 -1
- package/doc/SaslMechanismBase.html +1 -1
- package/doc/SaslMechanismPlain.html +5 -5
- package/doc/SeedStrategy.html +2 -2
- package/doc/SubgraphStrategy.html +2 -2
- package/doc/TextP.html +9 -9
- package/doc/Transaction.html +5 -5
- package/doc/Translator.html +1 -1
- package/doc/TraversalStrategies.html +4 -4
- package/doc/TraversalStrategy.html +2 -2
- package/doc/TypeSerializer.html +1 -1
- package/doc/driver_auth_authenticator.js.html +3 -3
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +25 -16
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +6 -6
- package/doc/driver_auth_sasl-authenticator.js.html +2 -2
- package/doc/driver_client.js.html +69 -23
- package/doc/driver_connection.js.html +107 -88
- package/doc/driver_driver-remote-connection.js.html +11 -10
- package/doc/driver_remote-connection.js.html +3 -4
- package/doc/driver_response-error.js.html +4 -3
- package/doc/driver_result-set.js.html +3 -3
- package/doc/global.html +199 -2
- package/doc/index.html +1 -1
- package/doc/process_anonymous-traversal.js.html +3 -3
- package/doc/process_bytecode.js.html +10 -8
- package/doc/process_graph-traversal.js.html +193 -142
- package/doc/process_transaction.js.html +15 -8
- package/doc/process_translator.js.html +13 -10
- package/doc/process_traversal-strategy.js.html +59 -53
- package/doc/process_traversal.js.html +100 -107
- package/doc/structure_graph.js.html +6 -6
- package/doc/structure_io_graph-serializer.js.html +64 -17
- package/doc/structure_io_type-serializers.js.html +85 -88
- package/index.js +5 -5
- package/lib/driver/auth/authenticator.js +2 -2
- package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
- package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
- package/lib/driver/auth/sasl-authenticator.js +1 -1
- package/lib/driver/client.js +68 -22
- package/lib/driver/connection.js +106 -87
- package/lib/driver/driver-remote-connection.js +10 -9
- package/lib/driver/remote-connection.js +2 -3
- package/lib/driver/response-error.js +2 -2
- package/lib/driver/result-set.js +1 -2
- package/lib/process/anonymous-traversal.js +1 -2
- package/lib/process/bytecode.js +9 -7
- package/lib/process/graph-traversal.js +191 -141
- package/lib/process/transaction.js +13 -7
- package/lib/process/translator.js +11 -9
- package/lib/process/traversal-strategy.js +57 -52
- package/lib/process/traversal.js +99 -106
- package/lib/structure/graph.js +5 -5
- package/lib/structure/io/graph-serializer.js +62 -16
- package/lib/structure/io/type-serializers.js +84 -87
- package/lib/utils.js +15 -10
- package/package.json +10 -5
|
@@ -40,14 +40,19 @@ class Transaction {
|
|
|
40
40
|
*/
|
|
41
41
|
begin() {
|
|
42
42
|
if (this._sessionBasedConnection) {
|
|
43
|
-
throw new Error(
|
|
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(
|
|
50
|
-
this._g.
|
|
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
|
|
37
|
+
return 'gremlin-groovy';
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
of(traversalSource) {
|
|
@@ -48,10 +48,10 @@ class Translator {
|
|
|
48
48
|
* @returns {string} Gremlin-Groovy script
|
|
49
49
|
*/
|
|
50
50
|
translate(bytecodeOrTraversal, child = false) {
|
|
51
|
-
let script = child ?
|
|
51
|
+
let script = child ? '__' : this._traversalSource;
|
|
52
52
|
const bc = bytecodeOrTraversal instanceof Bytecode ? bytecodeOrTraversal : bytecodeOrTraversal.getBytecode();
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
const instructions = bc.stepInstructions;
|
|
55
55
|
|
|
56
56
|
// build the script from the glv instructions.
|
|
57
57
|
for (let i = 0; i < instructions.length; i++) {
|
|
@@ -70,7 +70,7 @@ class Translator {
|
|
|
70
70
|
|
|
71
71
|
script += ')';
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
return script;
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -86,10 +86,12 @@ class Translator {
|
|
|
86
86
|
script += this.translate(anyObject.getBytecode(), true);
|
|
87
87
|
} else if (anyObject.toString() === '[object Object]') {
|
|
88
88
|
Object.keys(anyObject).forEach(function (key, index) {
|
|
89
|
-
if (index > 0)
|
|
90
|
-
|
|
89
|
+
if (index > 0) {
|
|
90
|
+
script += ', ';
|
|
91
|
+
}
|
|
92
|
+
script += `('${key}', `;
|
|
91
93
|
if (anyObject[key] instanceof String || typeof anyObject[key] === 'string') {
|
|
92
|
-
script += '
|
|
94
|
+
script += `'${anyObject[key]}'`;
|
|
93
95
|
} else {
|
|
94
96
|
script += anyObject[key];
|
|
95
97
|
}
|
|
@@ -109,11 +111,11 @@ class Translator {
|
|
|
109
111
|
} else if (typeof anyObject === 'number' || typeof anyObject === 'boolean') {
|
|
110
112
|
script += anyObject;
|
|
111
113
|
} else {
|
|
112
|
-
script += '
|
|
114
|
+
script += `'${anyObject}'`;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
return script;
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
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(
|
|
65
|
-
|
|
66
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
111
|
-
if (haltedTraverserFactory !== undefined)
|
|
112
|
-
this.configuration[
|
|
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(
|
|
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(
|
|
128
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy', options);
|
|
132
129
|
}
|
|
133
130
|
}
|
|
134
131
|
|
|
@@ -141,13 +138,16 @@ 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(
|
|
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
|
-
|
|
144
|
+
}
|
|
145
|
+
if (this.configuration.edges instanceof Traversal) {
|
|
148
146
|
this.configuration.edges = this.configuration.edges.bytecode;
|
|
149
|
-
|
|
147
|
+
}
|
|
148
|
+
if (this.configuration.vertexProperties instanceof Traversal) {
|
|
150
149
|
this.configuration.vertexProperties = this.configuration.vertexProperties.bytecode;
|
|
150
|
+
}
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -157,14 +157,13 @@ class ProductiveByStrategy extends TraversalStrategy {
|
|
|
157
157
|
* @param {Array<String>} [options.productiveKeys] set of keys that will always be productive
|
|
158
158
|
*/
|
|
159
159
|
constructor(options) {
|
|
160
|
-
super(
|
|
160
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy', options);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
class VertexProgramStrategy extends TraversalStrategy {
|
|
165
|
-
|
|
166
165
|
constructor(options) {
|
|
167
|
-
super(
|
|
166
|
+
super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy', options);
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
|
|
@@ -173,105 +172,106 @@ class MatchAlgorithmStrategy extends TraversalStrategy {
|
|
|
173
172
|
* @param matchAlgorithm
|
|
174
173
|
*/
|
|
175
174
|
constructor(matchAlgorithm) {
|
|
176
|
-
super(
|
|
177
|
-
if (matchAlgorithm !== undefined)
|
|
178
|
-
this.configuration[
|
|
175
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy');
|
|
176
|
+
if (matchAlgorithm !== undefined) {
|
|
177
|
+
this.configuration['matchAlgorithm'] = matchAlgorithm;
|
|
178
|
+
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
class AdjacentToIncidentStrategy extends TraversalStrategy {
|
|
183
183
|
constructor() {
|
|
184
|
-
super(
|
|
184
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy');
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
class FilterRankingStrategy extends TraversalStrategy {
|
|
189
189
|
constructor() {
|
|
190
|
-
super(
|
|
190
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy');
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
class IdentityRemovalStrategy extends TraversalStrategy {
|
|
195
195
|
constructor() {
|
|
196
|
-
super(
|
|
196
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy');
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
class IncidentToAdjacentStrategy extends TraversalStrategy {
|
|
201
201
|
constructor() {
|
|
202
|
-
super(
|
|
202
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy');
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
class InlineFilterStrategy extends TraversalStrategy {
|
|
207
207
|
constructor() {
|
|
208
|
-
super(
|
|
208
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy');
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
class LazyBarrierStrategy extends TraversalStrategy {
|
|
213
213
|
constructor() {
|
|
214
|
-
super(
|
|
214
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy');
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
class MatchPredicateStrategy extends TraversalStrategy {
|
|
219
219
|
constructor() {
|
|
220
|
-
super(
|
|
220
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy');
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
class OrderLimitStrategy extends TraversalStrategy {
|
|
225
225
|
constructor() {
|
|
226
|
-
super(
|
|
226
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy');
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
class PathProcessorStrategy extends TraversalStrategy {
|
|
231
231
|
constructor() {
|
|
232
|
-
super(
|
|
232
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy');
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
class PathRetractionStrategy extends TraversalStrategy {
|
|
237
237
|
constructor() {
|
|
238
|
-
super(
|
|
238
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy');
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
class CountStrategy extends TraversalStrategy {
|
|
243
243
|
constructor() {
|
|
244
|
-
super(
|
|
244
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy');
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
class RepeatUnrollStrategy extends TraversalStrategy {
|
|
249
249
|
constructor() {
|
|
250
|
-
super(
|
|
250
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy');
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
class GraphFilterStrategy extends TraversalStrategy {
|
|
255
255
|
constructor() {
|
|
256
|
-
super(
|
|
256
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy');
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
class EarlyLimitStrategy extends TraversalStrategy {
|
|
261
261
|
constructor() {
|
|
262
|
-
super(
|
|
262
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy');
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
class LambdaRestrictionStrategy extends TraversalStrategy {
|
|
267
267
|
constructor() {
|
|
268
|
-
super(
|
|
268
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy');
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
class ReadOnlyStrategy extends TraversalStrategy {
|
|
273
273
|
constructor() {
|
|
274
|
-
super(
|
|
274
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy');
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
|
|
@@ -280,9 +280,11 @@ class EdgeLabelVerificationStrategy extends TraversalStrategy {
|
|
|
280
280
|
* @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
|
|
281
281
|
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
282
282
|
*/
|
|
283
|
-
constructor(logWarnings = false, throwException=false) {
|
|
284
|
-
super(
|
|
285
|
-
|
|
283
|
+
constructor(logWarnings = false, throwException = false) {
|
|
284
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
|
|
285
|
+
logWarnings: logWarnings,
|
|
286
|
+
throwException: throwException,
|
|
287
|
+
});
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
290
|
|
|
@@ -292,9 +294,12 @@ class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
|
292
294
|
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
293
295
|
* @param {Array<String>} keys the list of reserved keys to verify
|
|
294
296
|
*/
|
|
295
|
-
constructor(logWarnings = false, throwException=false, keys=[
|
|
296
|
-
super(
|
|
297
|
-
|
|
297
|
+
constructor(logWarnings = false, throwException = false, keys = ['id', 'label']) {
|
|
298
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
|
|
299
|
+
logWarnings: logWarnings,
|
|
300
|
+
throwException: throwException,
|
|
301
|
+
keys: keys,
|
|
302
|
+
});
|
|
298
303
|
}
|
|
299
304
|
}
|
|
300
305
|
|
|
@@ -331,5 +336,5 @@ module.exports = {
|
|
|
331
336
|
EdgeLabelVerificationStrategy: EdgeLabelVerificationStrategy,
|
|
332
337
|
LambdaRestrictionStrategy: LambdaRestrictionStrategy,
|
|
333
338
|
ReadOnlyStrategy: ReadOnlyStrategy,
|
|
334
|
-
ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy
|
|
335
|
-
};
|
|
339
|
+
ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy,
|
|
340
|
+
};
|