gremlin 3.5.0 → 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 (91) hide show
  1. package/.eslintrc.js +154 -0
  2. package/.prettierrc.js +29 -0
  3. package/Gruntfile.js +15 -16
  4. package/NOTICE +1 -1
  5. package/doc/AnonymousTraversalSource.html +7 -7
  6. package/doc/Authenticator.html +3 -3
  7. package/doc/Bytecode.html +249 -5
  8. package/doc/Client.html +139 -65
  9. package/doc/Connection.html +90 -6
  10. package/doc/DriverRemoteConnection.html +380 -8
  11. package/doc/EdgeLabelVerificationStrategy.html +3 -3
  12. package/doc/Graph.html +2 -2
  13. package/doc/GraphSON2Reader.html +4 -4
  14. package/doc/GraphSON2Writer.html +3 -3
  15. package/doc/GraphSON3Reader.html +3 -3
  16. package/doc/GraphSON3Writer.html +3 -3
  17. package/doc/GraphTraversal.html +107 -107
  18. package/doc/GraphTraversalSource.html +130 -19
  19. package/doc/HaltedTraverserStrategy.html +3 -3
  20. package/doc/MatchAlgorithmStrategy.html +3 -3
  21. package/doc/P.html +13 -13
  22. package/doc/PartitionStrategy.html +3 -3
  23. package/doc/Path.html +2 -2
  24. package/doc/PlainTextSaslAuthenticator.html +2 -2
  25. package/doc/ProductiveByStrategy.html +288 -0
  26. package/doc/RemoteConnection.html +484 -10
  27. package/doc/RemoteStrategy.html +4 -4
  28. package/doc/RemoteTraversal.html +3 -3
  29. package/doc/ReservedKeysVerificationStrategy.html +3 -3
  30. package/doc/ResponseError.html +3 -3
  31. package/doc/ResultSet.html +8 -8
  32. package/doc/SaslAuthenticator.html +2 -2
  33. package/doc/SaslMechanismBase.html +3 -3
  34. package/doc/SaslMechanismPlain.html +6 -6
  35. package/doc/{GraphSONReader.html → SeedStrategy.html} +12 -15
  36. package/doc/SubgraphStrategy.html +3 -3
  37. package/doc/TextP.html +10 -10
  38. package/doc/Transaction.html +655 -0
  39. package/doc/Translator.html +200 -6
  40. package/doc/TraversalStrategies.html +137 -4
  41. package/doc/TraversalStrategy.html +4 -4
  42. package/doc/TypeSerializer.html +2 -2
  43. package/doc/driver_auth_authenticator.js.html +4 -4
  44. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +3 -3
  45. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +26 -17
  46. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +7 -7
  47. package/doc/driver_auth_sasl-authenticator.js.html +3 -3
  48. package/doc/driver_client.js.html +75 -25
  49. package/doc/driver_connection.js.html +108 -89
  50. package/doc/driver_driver-remote-connection.js.html +40 -9
  51. package/doc/driver_remote-connection.js.html +47 -6
  52. package/doc/driver_response-error.js.html +5 -4
  53. package/doc/driver_result-set.js.html +4 -4
  54. package/doc/global.html +200 -3
  55. package/doc/index.html +2 -2
  56. package/doc/process_anonymous-traversal.js.html +5 -5
  57. package/doc/process_bytecode.js.html +32 -7
  58. package/doc/process_graph-traversal.js.html +213 -143
  59. package/doc/process_transaction.js.html +143 -0
  60. package/doc/process_translator.js.html +58 -39
  61. package/doc/process_traversal-strategy.js.html +79 -52
  62. package/doc/process_traversal.js.html +101 -108
  63. package/doc/structure_graph.js.html +7 -7
  64. package/doc/structure_io_graph-serializer.js.html +65 -18
  65. package/doc/structure_io_type-serializers.js.html +86 -89
  66. package/index.js +5 -5
  67. package/lib/driver/auth/authenticator.js +2 -2
  68. package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
  69. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
  70. package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
  71. package/lib/driver/auth/sasl-authenticator.js +1 -1
  72. package/lib/driver/client.js +73 -23
  73. package/lib/driver/connection.js +106 -87
  74. package/lib/driver/driver-remote-connection.js +38 -7
  75. package/lib/driver/remote-connection.js +45 -4
  76. package/lib/driver/response-error.js +2 -2
  77. package/lib/driver/result-set.js +1 -2
  78. package/lib/process/anonymous-traversal.js +2 -3
  79. package/lib/process/bytecode.js +30 -5
  80. package/lib/process/graph-traversal.js +210 -141
  81. package/lib/process/transaction.js +92 -0
  82. package/lib/process/translator.js +55 -37
  83. package/lib/process/traversal-strategy.js +76 -50
  84. package/lib/process/traversal.js +99 -106
  85. package/lib/structure/graph.js +5 -5
  86. package/lib/structure/io/graph-serializer.js +62 -16
  87. package/lib/structure/io/type-serializers.js +84 -87
  88. package/lib/utils.js +15 -10
  89. package/package.json +11 -5
  90. package/doc/GraphSONWriter.html +0 -436
  91. package/gremlin-javascript.iml +0 -9
@@ -59,7 +59,6 @@ const emptyMap = Object.freeze(new utils.ImmutableMap());
59
59
  * Represents the response returned from the execution of a Gremlin traversal or script.
60
60
  */
61
61
  class ResultSet {
62
-
63
62
  /**
64
63
  * Creates a new instance of {@link ResultSet}.
65
64
  * @param {Array} items
@@ -118,7 +117,8 @@ class ResultSet {
118
117
  }
119
118
  }
120
119
 
121
- module.exports = ResultSet;</code></pre>
120
+ module.exports = ResultSet;
121
+ </code></pre>
122
122
  </article>
123
123
  </section>
124
124
 
@@ -128,13 +128,13 @@ module.exports = ResultSet;</code></pre>
128
128
  </div>
129
129
 
130
130
  <nav>
131
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
131
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
132
132
  </nav>
133
133
 
134
134
  <br class="clear">
135
135
 
136
136
  <footer>
137
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon May 10 2021 08:06:59 GMT-0400 (Eastern Daylight Time)
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)
138
138
  </footer>
139
139
 
140
140
  <script> prettyPrint(); </script>
package/doc/global.html CHANGED
@@ -152,7 +152,7 @@
152
152
 
153
153
  <dt class="tag-source">Source:</dt>
154
154
  <dd class="tag-source"><ul class="dummy"><li>
155
- <a href="process_graph-traversal.js.html">process/graph-traversal.js</a>, <a href="process_graph-traversal.js.html#line1286">line 1286</a>
155
+ <a href="process_graph-traversal.js.html">process/graph-traversal.js</a>, <a href="process_graph-traversal.js.html#line1355">line 1355</a>
156
156
  </li></ul></dd>
157
157
 
158
158
 
@@ -174,6 +174,203 @@
174
174
 
175
175
 
176
176
 
177
+ <h3 class="subsection-title">Type Definitions</h3>
178
+
179
+
180
+
181
+ <h4 class="name" id="RequestOptions">RequestOptions</h4>
182
+
183
+
184
+
185
+
186
+ <div class="description">
187
+ Configuration specific to the current request.
188
+ </div>
189
+
190
+
191
+
192
+ <h5>Type:</h5>
193
+ <ul>
194
+ <li>
195
+
196
+ <span class="param-type">Object</span>
197
+
198
+
199
+ </li>
200
+ </ul>
201
+
202
+
203
+
204
+
205
+
206
+ <h5 class="subsection-title">Properties:</h5>
207
+
208
+
209
+
210
+ <table class="props">
211
+ <thead>
212
+ <tr>
213
+
214
+ <th>Name</th>
215
+
216
+
217
+ <th>Type</th>
218
+
219
+
220
+
221
+
222
+
223
+ <th class="last">Description</th>
224
+ </tr>
225
+ </thead>
226
+
227
+ <tbody>
228
+
229
+
230
+ <tr>
231
+
232
+ <td class="name"><code>requestId</code></td>
233
+
234
+
235
+ <td class="type">
236
+
237
+
238
+ <span class="param-type">String</span>
239
+
240
+
241
+
242
+ </td>
243
+
244
+
245
+
246
+
247
+
248
+ <td class="description last">User specified request identifier which must be a UUID.</td>
249
+ </tr>
250
+
251
+
252
+
253
+ <tr>
254
+
255
+ <td class="name"><code>batchSize</code></td>
256
+
257
+
258
+ <td class="type">
259
+
260
+
261
+ <span class="param-type">Number</span>
262
+
263
+
264
+
265
+ </td>
266
+
267
+
268
+
269
+
270
+
271
+ <td class="description last">Indicates whether the Power component is present.</td>
272
+ </tr>
273
+
274
+
275
+
276
+ <tr>
277
+
278
+ <td class="name"><code>userAgent</code></td>
279
+
280
+
281
+ <td class="type">
282
+
283
+
284
+ <span class="param-type">String</span>
285
+
286
+
287
+
288
+ </td>
289
+
290
+
291
+
292
+
293
+
294
+ <td class="description last">The size in which the result of a request is to be 'batched' back to the client</td>
295
+ </tr>
296
+
297
+
298
+
299
+ <tr>
300
+
301
+ <td class="name"><code>evaluationTimeout</code></td>
302
+
303
+
304
+ <td class="type">
305
+
306
+
307
+ <span class="param-type">Number</span>
308
+
309
+
310
+
311
+ </td>
312
+
313
+
314
+
315
+
316
+
317
+ <td class="description last">The timeout for the evaluation of the request.</td>
318
+ </tr>
319
+
320
+
321
+ </tbody>
322
+ </table>
323
+
324
+
325
+
326
+
327
+ <dl class="details">
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <dt class="tag-source">Source:</dt>
355
+ <dd class="tag-source"><ul class="dummy"><li>
356
+ <a href="driver_client.js.html">driver/client.js</a>, <a href="driver_client.js.html#line75">line 75</a>
357
+ </li></ul></dd>
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ </dl>
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
177
374
 
178
375
 
179
376
  </article>
@@ -186,13 +383,13 @@
186
383
  </div>
187
384
 
188
385
  <nav>
189
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
386
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
190
387
  </nav>
191
388
 
192
389
  <br class="clear">
193
390
 
194
391
  <footer>
195
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon May 10 2021 08:06:59 GMT-0400 (Eastern Daylight Time)
392
+ 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)
196
393
  </footer>
197
394
 
198
395
  <script> prettyPrint(); </script>
package/doc/index.html CHANGED
@@ -170,13 +170,13 @@ thus for early testing purposes only.</p></article>
170
170
  </div>
171
171
 
172
172
  <nav>
173
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
173
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
174
174
  </nav>
175
175
 
176
176
  <br class="clear">
177
177
 
178
178
  <footer>
179
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon May 10 2021 08:06:59 GMT-0400 (Eastern Daylight Time)
179
+ 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)
180
180
  </footer>
181
181
 
182
182
  <script> prettyPrint(); </script>
@@ -58,7 +58,6 @@ const Graph = require('../structure/graph').Graph;
58
58
  * instance or a &lt;code>RemoteConnection&lt;/code>.
59
59
  */
60
60
  class AnonymousTraversalSource {
61
-
62
61
  /**
63
62
  * Creates a new instance of {@code AnonymousTraversalSource}.
64
63
  * @param {Function} [traversalSourceClass] Optional {@code GraphTraversalSource} constructor.
@@ -80,7 +79,7 @@ class AnonymousTraversalSource {
80
79
  /**
81
80
  * Creates a {@link GraphTraversalSource} binding a {@link RemoteConnection} to a remote {@link Graph} instances as its
82
81
  * reference so that traversals spawned from it will execute over that reference.
83
- * @param {GraphTraversalSource} remoteConnection
82
+ * @param {RemoteConnection} remoteConnection
84
83
  * @return {GraphTraversalSource}
85
84
  */
86
85
  withRemote(remoteConnection) {
@@ -103,7 +102,8 @@ class AnonymousTraversalSource {
103
102
  }
104
103
  }
105
104
 
106
- module.exports = AnonymousTraversalSource;</code></pre>
105
+ module.exports = AnonymousTraversalSource;
106
+ </code></pre>
107
107
  </article>
108
108
  </section>
109
109
 
@@ -113,13 +113,13 @@ module.exports = AnonymousTraversalSource;</code></pre>
113
113
  </div>
114
114
 
115
115
  <nav>
116
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
116
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
117
117
  </nav>
118
118
 
119
119
  <br class="clear">
120
120
 
121
121
  <footer>
122
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon May 10 2021 08:06:59 GMT-0400 (Eastern Daylight Time)
122
+ 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)
123
123
  </footer>
124
124
 
125
125
  <script> prettyPrint(); </script>
@@ -61,8 +61,7 @@ class Bytecode {
61
61
  if (!toClone) {
62
62
  this.sourceInstructions = [];
63
63
  this.stepInstructions = [];
64
- }
65
- else {
64
+ } else {
66
65
  this.sourceInstructions = [...toClone.sourceInstructions];
67
66
  this.stepInstructions = [...toClone.stepInstructions];
68
67
  }
@@ -107,9 +106,12 @@ class Bytecode {
107
106
  instruction[0] = name;
108
107
  for (let i = 1; i &lt; length; i++) {
109
108
  const val = values[i - 1];
110
- if (val instanceof Traversal &amp;&amp; val.graph != null)
111
- throw new Error("The child traversal of ${val} was not spawned anonymously - use " +
112
- "the __ class rather than a TraversalSource to construct the child traversal");
109
+ if (val instanceof Traversal &amp;&amp; val.graph != null) {
110
+ throw new Error(
111
+ `The child traversal of ${val} was not spawned anonymously - use ` +
112
+ 'the __ class rather than a TraversalSource to construct the child traversal',
113
+ );
114
+ }
113
115
  instruction[i] = val;
114
116
  }
115
117
  return instruction;
@@ -122,6 +124,29 @@ class Bytecode {
122
124
  toString() {
123
125
  return JSON.stringify([this.sourceInstructions, this.stepInstructions]);
124
126
  }
127
+
128
+ /**
129
+ * Adds a new source instructions
130
+ * @param {String} name
131
+ * @param {Array} values
132
+ * @returns {Bytecode}
133
+ */
134
+ static _createGraphOp(name, values) {
135
+ const bc = new Bytecode();
136
+ bc.addSource(name, values);
137
+ return bc;
138
+ }
139
+
140
+ /**
141
+ * Gets the &lt;code>Bytecode&lt;/code> that is meant to be sent as "graph operations" to the server.
142
+ * @returns {{rollback: Bytecode, commit: Bytecode}}
143
+ */
144
+ static get GraphOp() {
145
+ return {
146
+ commit: Bytecode._createGraphOp('tx', ['commit']),
147
+ rollback: Bytecode._createGraphOp('tx', ['rollback']),
148
+ };
149
+ }
125
150
  }
126
151
 
127
152
  module.exports = Bytecode;
@@ -135,13 +160,13 @@ module.exports = Bytecode;
135
160
  </div>
136
161
 
137
162
  <nav>
138
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
163
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
139
164
  </nav>
140
165
 
141
166
  <br class="clear">
142
167
 
143
168
  <footer>
144
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon May 10 2021 08:06:59 GMT-0400 (Eastern Daylight Time)
169
+ 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)
145
170
  </footer>
146
171
 
147
172
  <script> prettyPrint(); </script>