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
|
@@ -68,14 +68,19 @@ class Transaction {
|
|
|
68
68
|
*/
|
|
69
69
|
begin() {
|
|
70
70
|
if (this._sessionBasedConnection) {
|
|
71
|
-
throw new Error(
|
|
71
|
+
throw new Error('Transaction already started on this object');
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
this._sessionBasedConnection = this._g.remoteConnection.createSession();
|
|
75
75
|
const traversalStrategy = new TraversalStrategies();
|
|
76
76
|
traversalStrategy.addStrategy(new remote.RemoteStrategy(this._sessionBasedConnection));
|
|
77
|
-
return new this._g.graphTraversalSourceClass(
|
|
78
|
-
this._g.
|
|
77
|
+
return new this._g.graphTraversalSourceClass(
|
|
78
|
+
this._g.graph,
|
|
79
|
+
traversalStrategy,
|
|
80
|
+
new Bytecode(this._g.bytecode),
|
|
81
|
+
this._g.graphTraversalSourceClass,
|
|
82
|
+
this._g.graphTraversalClass,
|
|
83
|
+
);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
/**
|
|
@@ -97,21 +102,23 @@ class Transaction {
|
|
|
97
102
|
* @returns {Boolean}
|
|
98
103
|
*/
|
|
99
104
|
get isOpen() {
|
|
100
|
-
this._sessionBasedConnection.isOpen;
|
|
105
|
+
return this._sessionBasedConnection.isOpen;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
/**
|
|
104
109
|
* @returns {Promise}
|
|
105
110
|
*/
|
|
106
111
|
close() {
|
|
107
|
-
if (this._sessionBasedConnection)
|
|
112
|
+
if (this._sessionBasedConnection) {
|
|
108
113
|
this._sessionBasedConnection.close();
|
|
114
|
+
}
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
module.exports = {
|
|
113
|
-
Transaction
|
|
114
|
-
}
|
|
119
|
+
Transaction,
|
|
120
|
+
};
|
|
121
|
+
</code></pre>
|
|
115
122
|
</article>
|
|
116
123
|
</section>
|
|
117
124
|
|
|
@@ -127,7 +134,7 @@ module.exports = {
|
|
|
127
134
|
<br class="clear">
|
|
128
135
|
|
|
129
136
|
<footer>
|
|
130
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
137
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
131
138
|
</footer>
|
|
132
139
|
|
|
133
140
|
<script> prettyPrint(); </script>
|
|
@@ -62,7 +62,7 @@ class Translator {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
getTargetLanguage() {
|
|
65
|
-
return
|
|
65
|
+
return 'gremlin-groovy';
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
of(traversalSource) {
|
|
@@ -76,10 +76,10 @@ class Translator {
|
|
|
76
76
|
* @returns {string} Gremlin-Groovy script
|
|
77
77
|
*/
|
|
78
78
|
translate(bytecodeOrTraversal, child = false) {
|
|
79
|
-
let script = child ?
|
|
79
|
+
let script = child ? '__' : this._traversalSource;
|
|
80
80
|
const bc = bytecodeOrTraversal instanceof Bytecode ? bytecodeOrTraversal : bytecodeOrTraversal.getBytecode();
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
const instructions = bc.stepInstructions;
|
|
83
83
|
|
|
84
84
|
// build the script from the glv instructions.
|
|
85
85
|
for (let i = 0; i < instructions.length; i++) {
|
|
@@ -98,7 +98,7 @@ class Translator {
|
|
|
98
98
|
|
|
99
99
|
script += ')';
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
return script;
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -114,10 +114,12 @@ class Translator {
|
|
|
114
114
|
script += this.translate(anyObject.getBytecode(), true);
|
|
115
115
|
} else if (anyObject.toString() === '[object Object]') {
|
|
116
116
|
Object.keys(anyObject).forEach(function (key, index) {
|
|
117
|
-
if (index > 0)
|
|
118
|
-
|
|
117
|
+
if (index > 0) {
|
|
118
|
+
script += ', ';
|
|
119
|
+
}
|
|
120
|
+
script += `('${key}', `;
|
|
119
121
|
if (anyObject[key] instanceof String || typeof anyObject[key] === 'string') {
|
|
120
|
-
script += '
|
|
122
|
+
script += `'${anyObject[key]}'`;
|
|
121
123
|
} else {
|
|
122
124
|
script += anyObject[key];
|
|
123
125
|
}
|
|
@@ -137,14 +139,15 @@ class Translator {
|
|
|
137
139
|
} else if (typeof anyObject === 'number' || typeof anyObject === 'boolean') {
|
|
138
140
|
script += anyObject;
|
|
139
141
|
} else {
|
|
140
|
-
script += '
|
|
142
|
+
script += `'${anyObject}'`;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
return script;
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
|
|
147
|
-
module.exports = Translator
|
|
149
|
+
module.exports = Translator;
|
|
150
|
+
</code></pre>
|
|
148
151
|
</article>
|
|
149
152
|
</section>
|
|
150
153
|
|
|
@@ -160,7 +163,7 @@ module.exports = Translator;</code></pre>
|
|
|
160
163
|
<br class="clear">
|
|
161
164
|
|
|
162
165
|
<footer>
|
|
163
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
166
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
164
167
|
</footer>
|
|
165
168
|
|
|
166
169
|
<script> prettyPrint(); </script>
|
|
@@ -62,8 +62,7 @@ class TraversalStrategies {
|
|
|
62
62
|
if (parent) {
|
|
63
63
|
// Clone the strategies
|
|
64
64
|
this.strategies = [...parent.strategies];
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
65
|
+
} else {
|
|
67
66
|
this.strategies = [];
|
|
68
67
|
}
|
|
69
68
|
}
|
|
@@ -75,7 +74,7 @@ class TraversalStrategies {
|
|
|
75
74
|
|
|
76
75
|
/** @param {TraversalStrategy} strategy */
|
|
77
76
|
removeStrategy(strategy) {
|
|
78
|
-
const idx = this.strategies.findIndex(s => s.fqcn === strategy.fqcn);
|
|
77
|
+
const idx = this.strategies.findIndex((s) => s.fqcn === strategy.fqcn);
|
|
79
78
|
if (idx !== -1) {
|
|
80
79
|
return this.strategies.splice(idx, 1)[0];
|
|
81
80
|
}
|
|
@@ -89,15 +88,15 @@ class TraversalStrategies {
|
|
|
89
88
|
*/
|
|
90
89
|
applyStrategies(traversal) {
|
|
91
90
|
// Apply all strategies serially
|
|
92
|
-
return this.strategies.reduce(
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
return this.strategies.reduce(
|
|
92
|
+
(promise, strategy) => promise.then(() => strategy.apply(traversal)),
|
|
93
|
+
Promise.resolve(),
|
|
94
|
+
);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/** @abstract */
|
|
99
99
|
class TraversalStrategy {
|
|
100
|
-
|
|
101
100
|
/**
|
|
102
101
|
* @param {String} fqcn fully qualified class name in Java of the strategy
|
|
103
102
|
* @param {Object} configuration for the strategy
|
|
@@ -112,38 +111,36 @@ class TraversalStrategy {
|
|
|
112
111
|
* @param {Traversal} traversal
|
|
113
112
|
* @returns {Promise}
|
|
114
113
|
*/
|
|
115
|
-
apply(traversal) {
|
|
116
|
-
|
|
117
|
-
}
|
|
114
|
+
apply(traversal) {}
|
|
118
115
|
}
|
|
119
116
|
|
|
120
117
|
class ConnectiveStrategy extends TraversalStrategy {
|
|
121
118
|
constructor() {
|
|
122
|
-
super(
|
|
119
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy');
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
122
|
|
|
126
123
|
class ElementIdStrategy extends TraversalStrategy {
|
|
127
124
|
constructor() {
|
|
128
|
-
super(
|
|
125
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy');
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
class HaltedTraverserStrategy extends TraversalStrategy {
|
|
133
|
-
|
|
134
130
|
/**
|
|
135
131
|
* @param {String} haltedTraverserFactory full qualified class name in Java of a {@code HaltedTraverserFactory} implementation
|
|
136
132
|
*/
|
|
137
133
|
constructor(haltedTraverserFactory) {
|
|
138
|
-
super(
|
|
139
|
-
if (haltedTraverserFactory !== undefined)
|
|
140
|
-
this.configuration[
|
|
134
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy');
|
|
135
|
+
if (haltedTraverserFactory !== undefined) {
|
|
136
|
+
this.configuration['haltedTraverserFactory'] = haltedTraverserFactory;
|
|
137
|
+
}
|
|
141
138
|
}
|
|
142
139
|
}
|
|
143
140
|
|
|
144
141
|
class OptionsStrategy extends TraversalStrategy {
|
|
145
142
|
constructor(options) {
|
|
146
|
-
super(
|
|
143
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy', options);
|
|
147
144
|
}
|
|
148
145
|
}
|
|
149
146
|
|
|
@@ -156,7 +153,7 @@ class PartitionStrategy extends TraversalStrategy {
|
|
|
156
153
|
* @param {boolean} [options.includeMetaProperties] determines if meta-properties should be included in partitioning defaulting to false
|
|
157
154
|
*/
|
|
158
155
|
constructor(options) {
|
|
159
|
-
super(
|
|
156
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy', options);
|
|
160
157
|
}
|
|
161
158
|
}
|
|
162
159
|
|
|
@@ -169,13 +166,16 @@ class SubgraphStrategy extends TraversalStrategy {
|
|
|
169
166
|
* @param {boolean} [options.checkAdjacentVertices] enables the strategy to apply the {@code vertices} filter to the adjacent vertices of an edge.
|
|
170
167
|
*/
|
|
171
168
|
constructor(options) {
|
|
172
|
-
super(
|
|
173
|
-
if (this.configuration.vertices instanceof Traversal)
|
|
169
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy', options);
|
|
170
|
+
if (this.configuration.vertices instanceof Traversal) {
|
|
174
171
|
this.configuration.vertices = this.configuration.vertices.bytecode;
|
|
175
|
-
|
|
172
|
+
}
|
|
173
|
+
if (this.configuration.edges instanceof Traversal) {
|
|
176
174
|
this.configuration.edges = this.configuration.edges.bytecode;
|
|
177
|
-
|
|
175
|
+
}
|
|
176
|
+
if (this.configuration.vertexProperties instanceof Traversal) {
|
|
178
177
|
this.configuration.vertexProperties = this.configuration.vertexProperties.bytecode;
|
|
178
|
+
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -185,14 +185,13 @@ class ProductiveByStrategy extends TraversalStrategy {
|
|
|
185
185
|
* @param {Array<String>} [options.productiveKeys] set of keys that will always be productive
|
|
186
186
|
*/
|
|
187
187
|
constructor(options) {
|
|
188
|
-
super(
|
|
188
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy', options);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
class VertexProgramStrategy extends TraversalStrategy {
|
|
193
|
-
|
|
194
193
|
constructor(options) {
|
|
195
|
-
super(
|
|
194
|
+
super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy', options);
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
197
|
|
|
@@ -201,105 +200,106 @@ class MatchAlgorithmStrategy extends TraversalStrategy {
|
|
|
201
200
|
* @param matchAlgorithm
|
|
202
201
|
*/
|
|
203
202
|
constructor(matchAlgorithm) {
|
|
204
|
-
super(
|
|
205
|
-
if (matchAlgorithm !== undefined)
|
|
206
|
-
this.configuration[
|
|
203
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy');
|
|
204
|
+
if (matchAlgorithm !== undefined) {
|
|
205
|
+
this.configuration['matchAlgorithm'] = matchAlgorithm;
|
|
206
|
+
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
class AdjacentToIncidentStrategy extends TraversalStrategy {
|
|
211
211
|
constructor() {
|
|
212
|
-
super(
|
|
212
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy');
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
class FilterRankingStrategy extends TraversalStrategy {
|
|
217
217
|
constructor() {
|
|
218
|
-
super(
|
|
218
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy');
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
class IdentityRemovalStrategy extends TraversalStrategy {
|
|
223
223
|
constructor() {
|
|
224
|
-
super(
|
|
224
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy');
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
class IncidentToAdjacentStrategy extends TraversalStrategy {
|
|
229
229
|
constructor() {
|
|
230
|
-
super(
|
|
230
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy');
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
class InlineFilterStrategy extends TraversalStrategy {
|
|
235
235
|
constructor() {
|
|
236
|
-
super(
|
|
236
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy');
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
class LazyBarrierStrategy extends TraversalStrategy {
|
|
241
241
|
constructor() {
|
|
242
|
-
super(
|
|
242
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy');
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
class MatchPredicateStrategy extends TraversalStrategy {
|
|
247
247
|
constructor() {
|
|
248
|
-
super(
|
|
248
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy');
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
class OrderLimitStrategy extends TraversalStrategy {
|
|
253
253
|
constructor() {
|
|
254
|
-
super(
|
|
254
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy');
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
class PathProcessorStrategy extends TraversalStrategy {
|
|
259
259
|
constructor() {
|
|
260
|
-
super(
|
|
260
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy');
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
class PathRetractionStrategy extends TraversalStrategy {
|
|
265
265
|
constructor() {
|
|
266
|
-
super(
|
|
266
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy');
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
class CountStrategy extends TraversalStrategy {
|
|
271
271
|
constructor() {
|
|
272
|
-
super(
|
|
272
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy');
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
class RepeatUnrollStrategy extends TraversalStrategy {
|
|
277
277
|
constructor() {
|
|
278
|
-
super(
|
|
278
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy');
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
class GraphFilterStrategy extends TraversalStrategy {
|
|
283
283
|
constructor() {
|
|
284
|
-
super(
|
|
284
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy');
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
class EarlyLimitStrategy extends TraversalStrategy {
|
|
289
289
|
constructor() {
|
|
290
|
-
super(
|
|
290
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy');
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
class LambdaRestrictionStrategy extends TraversalStrategy {
|
|
295
295
|
constructor() {
|
|
296
|
-
super(
|
|
296
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy');
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
class ReadOnlyStrategy extends TraversalStrategy {
|
|
301
301
|
constructor() {
|
|
302
|
-
super(
|
|
302
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy');
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
|
|
@@ -308,9 +308,11 @@ class EdgeLabelVerificationStrategy extends TraversalStrategy {
|
|
|
308
308
|
* @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
|
|
309
309
|
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
310
310
|
*/
|
|
311
|
-
constructor(logWarnings = false, throwException=false) {
|
|
312
|
-
super(
|
|
313
|
-
|
|
311
|
+
constructor(logWarnings = false, throwException = false) {
|
|
312
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
|
|
313
|
+
logWarnings: logWarnings,
|
|
314
|
+
throwException: throwException,
|
|
315
|
+
});
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
318
|
|
|
@@ -320,9 +322,12 @@ class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
|
320
322
|
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
321
323
|
* @param {Array<String>} keys the list of reserved keys to verify
|
|
322
324
|
*/
|
|
323
|
-
constructor(logWarnings = false, throwException=false, keys=[
|
|
324
|
-
super(
|
|
325
|
-
|
|
325
|
+
constructor(logWarnings = false, throwException = false, keys = ['id', 'label']) {
|
|
326
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
|
|
327
|
+
logWarnings: logWarnings,
|
|
328
|
+
throwException: throwException,
|
|
329
|
+
keys: keys,
|
|
330
|
+
});
|
|
326
331
|
}
|
|
327
332
|
}
|
|
328
333
|
|
|
@@ -359,8 +364,9 @@ module.exports = {
|
|
|
359
364
|
EdgeLabelVerificationStrategy: EdgeLabelVerificationStrategy,
|
|
360
365
|
LambdaRestrictionStrategy: LambdaRestrictionStrategy,
|
|
361
366
|
ReadOnlyStrategy: ReadOnlyStrategy,
|
|
362
|
-
ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy
|
|
363
|
-
}
|
|
367
|
+
ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy,
|
|
368
|
+
};
|
|
369
|
+
</code></pre>
|
|
364
370
|
</article>
|
|
365
371
|
</section>
|
|
366
372
|
|
|
@@ -376,7 +382,7 @@ module.exports = {
|
|
|
376
382
|
<br class="clear">
|
|
377
383
|
|
|
378
384
|
<footer>
|
|
379
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
385
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
380
386
|
</footer>
|
|
381
387
|
|
|
382
388
|
<script> prettyPrint(); </script>
|