gremlin 3.5.3 → 3.6.1
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 +3 -2
- package/README.md +2 -2
- package/doc/AnonymousTraversalSource.html +2 -2
- package/doc/Authenticator.html +2 -2
- package/doc/Bytecode.html +2 -2
- package/doc/Client.html +2 -2
- package/doc/Connection.html +10 -10
- package/doc/DriverRemoteConnection.html +2 -2
- package/doc/EdgeLabelVerificationStrategy.html +2 -2
- package/doc/Graph.html +2 -2
- package/doc/GraphSON2Reader.html +2 -2
- package/doc/GraphSON2Writer.html +2 -2
- package/doc/GraphSON3Reader.html +2 -2
- package/doc/GraphSON3Writer.html +2 -2
- package/doc/GraphTraversal.html +1006 -171
- package/doc/GraphTraversalSource.html +517 -16
- package/doc/HaltedTraverserStrategy.html +2 -2
- package/doc/MatchAlgorithmStrategy.html +2 -2
- package/doc/P.html +2 -2
- package/doc/PartitionStrategy.html +2 -2
- package/doc/Path.html +2 -2
- package/doc/PlainTextSaslAuthenticator.html +2 -2
- package/doc/ProductiveByStrategy.html +2 -2
- package/doc/RemoteConnection.html +2 -2
- package/doc/RemoteStrategy.html +2 -2
- package/doc/RemoteTraversal.html +2 -2
- package/doc/ReservedKeysVerificationStrategy.html +2 -2
- package/doc/ResponseError.html +2 -2
- package/doc/ResultSet.html +2 -2
- package/doc/SaslAuthenticator.html +2 -2
- package/doc/SaslMechanismBase.html +2 -2
- package/doc/SaslMechanismPlain.html +2 -2
- package/doc/SeedStrategy.html +2 -2
- package/doc/SubgraphStrategy.html +2 -2
- package/doc/TextP.html +292 -2
- package/doc/Transaction.html +2 -2
- package/doc/Translator.html +2 -2
- package/doc/TraversalStrategies.html +2 -2
- package/doc/TraversalStrategy.html +2 -2
- package/doc/TypeSerializer.html +2 -2
- package/doc/driver_auth_authenticator.js.html +2 -2
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +2 -2
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +2 -2
- package/doc/driver_auth_sasl-authenticator.js.html +2 -2
- package/doc/driver_client.js.html +2 -2
- package/doc/driver_connection.js.html +32 -9
- package/doc/driver_driver-remote-connection.js.html +2 -2
- package/doc/driver_remote-connection.js.html +2 -2
- package/doc/driver_response-error.js.html +2 -2
- package/doc/driver_result-set.js.html +2 -2
- package/doc/global.html +67 -3
- package/doc/index.html +4 -4
- package/doc/module.exports.html +301 -0
- package/doc/process_anonymous-traversal.js.html +2 -2
- package/doc/process_bytecode.js.html +2 -2
- package/doc/process_graph-traversal.js.html +108 -13
- package/doc/process_transaction.js.html +2 -2
- package/doc/process_translator.js.html +2 -2
- package/doc/process_traversal-strategy.js.html +16 -3
- package/doc/process_traversal.js.html +14 -3
- package/doc/structure_graph.js.html +2 -2
- package/doc/structure_io_binary_internals_DataType.js.html +149 -0
- package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +131 -0
- package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +134 -0
- package/doc/structure_io_graph-serializer.js.html +2 -2
- package/doc/structure_io_type-serializers.js.html +2 -2
- package/lib/driver/connection.js +30 -7
- package/lib/process/graph-traversal.js +106 -11
- package/lib/process/traversal-strategy.js +14 -1
- package/lib/process/traversal.js +12 -1
- package/lib/structure/io/binary/GraphBinary.js +109 -0
- package/lib/structure/io/binary/internals/AnySerializer.js +95 -0
- package/lib/structure/io/binary/internals/ArraySerializer.js +135 -0
- package/lib/structure/io/binary/internals/BigIntegerSerializer.js +151 -0
- package/lib/structure/io/binary/internals/BooleanSerializer.js +103 -0
- package/lib/structure/io/binary/internals/BulkSetSerializer.js +124 -0
- package/lib/structure/io/binary/internals/ByteBufferSerializer.js +124 -0
- package/lib/structure/io/binary/internals/ByteSerializer.js +95 -0
- package/lib/structure/io/binary/internals/BytecodeSerializer.js +249 -0
- package/lib/structure/io/binary/internals/DataType.js +98 -0
- package/lib/structure/io/binary/internals/DateSerializer.js +103 -0
- package/lib/structure/io/binary/internals/DoubleSerializer.js +99 -0
- package/lib/structure/io/binary/internals/EdgeSerializer.js +215 -0
- package/lib/structure/io/binary/internals/EnumSerializer.js +149 -0
- package/lib/structure/io/binary/internals/FloatSerializer.js +99 -0
- package/lib/structure/io/binary/internals/GraphBinaryReader.js +80 -0
- package/lib/structure/io/binary/internals/GraphBinaryWriter.js +83 -0
- package/lib/structure/io/binary/internals/IntSerializer.js +112 -0
- package/lib/structure/io/binary/internals/LambdaSerializer.js +70 -0
- package/lib/structure/io/binary/internals/LongSerializer.js +107 -0
- package/lib/structure/io/binary/internals/LongSerializerNg.js +102 -0
- package/lib/structure/io/binary/internals/MapSerializer.js +153 -0
- package/lib/structure/io/binary/internals/NumberSerializationStrategy.js +68 -0
- package/lib/structure/io/binary/internals/PSerializer.js +151 -0
- package/lib/structure/io/binary/internals/PathSerializer.js +123 -0
- package/lib/structure/io/binary/internals/PropertySerializer.js +141 -0
- package/lib/structure/io/binary/internals/ShortSerializer.js +99 -0
- package/lib/structure/io/binary/internals/StringSerializer.js +114 -0
- package/lib/structure/io/binary/internals/TextPSerializer.js +145 -0
- package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +72 -0
- package/lib/structure/io/binary/internals/TraverserSerializer.js +123 -0
- package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +75 -0
- package/lib/structure/io/binary/internals/UuidSerializer.js +119 -0
- package/lib/structure/io/binary/internals/VertexPropertySerializer.js +172 -0
- package/lib/structure/io/binary/internals/VertexSerializer.js +135 -0
- package/lib/structure/io/binary/internals/utils.js +59 -0
- package/package.json +12 -4
|
@@ -323,7 +323,7 @@ class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
|
323
323
|
* @param {Array<String>} keys the list of reserved keys to verify
|
|
324
324
|
*/
|
|
325
325
|
constructor(logWarnings = false, throwException = false, keys = ['id', 'label']) {
|
|
326
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.
|
|
326
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReservedKeysVerificationStrategy', {
|
|
327
327
|
logWarnings: logWarnings,
|
|
328
328
|
throwException: throwException,
|
|
329
329
|
keys: keys,
|
|
@@ -331,6 +331,18 @@ class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
class SeedStrategy extends TraversalStrategy {
|
|
335
|
+
/**
|
|
336
|
+
* @param {Object} [options]
|
|
337
|
+
* @param {number} [options.seed] the seed to provide to the random number generator for the traversal
|
|
338
|
+
*/
|
|
339
|
+
constructor(options) {
|
|
340
|
+
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy', {
|
|
341
|
+
seed: options.seed,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
334
346
|
module.exports = {
|
|
335
347
|
TraversalStrategies: TraversalStrategies,
|
|
336
348
|
TraversalStrategy: TraversalStrategy,
|
|
@@ -340,6 +352,7 @@ module.exports = {
|
|
|
340
352
|
HaltedTraverserStrategy: HaltedTraverserStrategy,
|
|
341
353
|
OptionsStrategy: OptionsStrategy,
|
|
342
354
|
PartitionStrategy: PartitionStrategy,
|
|
355
|
+
SeedStrategy: SeedStrategy,
|
|
343
356
|
SubgraphStrategy: SubgraphStrategy,
|
|
344
357
|
VertexProgramStrategy: VertexProgramStrategy,
|
|
345
358
|
// finalization
|
|
@@ -376,13 +389,13 @@ module.exports = {
|
|
|
376
389
|
</div>
|
|
377
390
|
|
|
378
391
|
<nav>
|
|
379
|
-
<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>
|
|
392
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
380
393
|
</nav>
|
|
381
394
|
|
|
382
395
|
<br class="clear">
|
|
383
396
|
|
|
384
397
|
<footer>
|
|
385
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
398
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
386
399
|
</footer>
|
|
387
400
|
|
|
388
401
|
<script> prettyPrint(); </script>
|
|
@@ -450,6 +450,16 @@ class TextP {
|
|
|
450
450
|
static startingWith(...args) {
|
|
451
451
|
return createTextP('startingWith', args);
|
|
452
452
|
}
|
|
453
|
+
|
|
454
|
+
/** @param {...Object} args */
|
|
455
|
+
static regex(...args) {
|
|
456
|
+
return createTextP('regex', args);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/** @param {...Object} args */
|
|
460
|
+
static notRegex(...args) {
|
|
461
|
+
return createTextP('notRegex', args);
|
|
462
|
+
}
|
|
453
463
|
}
|
|
454
464
|
|
|
455
465
|
function createTextP(operator, args) {
|
|
@@ -514,9 +524,10 @@ module.exports = {
|
|
|
514
524
|
barrier: toEnum('Barrier', 'normSack'),
|
|
515
525
|
cardinality: toEnum('Cardinality', 'list set single'),
|
|
516
526
|
column: toEnum('Column', 'keys values'),
|
|
517
|
-
direction: toEnum('Direction', 'BOTH IN OUT'),
|
|
527
|
+
direction: toEnum('Direction', 'BOTH IN OUT from_ to'),
|
|
518
528
|
graphSONVersion: toEnum('GraphSONVersion', 'V1_0 V2_0 V3_0'),
|
|
519
529
|
gryoVersion: toEnum('GryoVersion', 'V1_0 V3_0'),
|
|
530
|
+
merge: toEnum('Merge', 'onCreate onMatch'),
|
|
520
531
|
operator: toEnum('Operator', 'addAll and assign div max min minus mult or sum sumLong'),
|
|
521
532
|
order: toEnum('Order', 'asc desc shuffle'),
|
|
522
533
|
pick: toEnum('Pick', 'any none'),
|
|
@@ -534,13 +545,13 @@ module.exports = {
|
|
|
534
545
|
</div>
|
|
535
546
|
|
|
536
547
|
<nav>
|
|
537
|
-
<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>
|
|
548
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
538
549
|
</nav>
|
|
539
550
|
|
|
540
551
|
<br class="clear">
|
|
541
552
|
|
|
542
553
|
<footer>
|
|
543
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
554
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
544
555
|
</footer>
|
|
545
556
|
|
|
546
557
|
<script> prettyPrint(); </script>
|
|
@@ -226,13 +226,13 @@ module.exports = {
|
|
|
226
226
|
</div>
|
|
227
227
|
|
|
228
228
|
<nav>
|
|
229
|
-
<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>
|
|
229
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
230
230
|
</nav>
|
|
231
231
|
|
|
232
232
|
<br class="clear">
|
|
233
233
|
|
|
234
234
|
<footer>
|
|
235
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
235
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
236
236
|
</footer>
|
|
237
237
|
|
|
238
238
|
<script> prettyPrint(); </script>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: structure/io/binary/internals/DataType.js</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: structure/io/binary/internals/DataType.js</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>/*
|
|
30
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
31
|
+
* or more contributor license agreements. See the NOTICE file
|
|
32
|
+
* distributed with this work for additional information
|
|
33
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
34
|
+
* to you under the Apache License, Version 2.0 (the
|
|
35
|
+
* "License"); you may not use this file except in compliance
|
|
36
|
+
* with the License. You may obtain a copy of the License at
|
|
37
|
+
*
|
|
38
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39
|
+
*
|
|
40
|
+
* Unless required by applicable law or agreed to in writing,
|
|
41
|
+
* software distributed under the License is distributed on an
|
|
42
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
43
|
+
* KIND, either express or implied. See the License for the
|
|
44
|
+
* specific language governing permissions and limitations
|
|
45
|
+
* under the License.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @author Igor Ostapenko
|
|
50
|
+
*/
|
|
51
|
+
'use strict';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Represents a GraphBinary data type.
|
|
55
|
+
*
|
|
56
|
+
* See org.apache.tinkerpop.gremlin.structure.io.binary.DataType Java class.
|
|
57
|
+
*/
|
|
58
|
+
const DataType = {
|
|
59
|
+
INT: 0x01,
|
|
60
|
+
LONG: 0x02,
|
|
61
|
+
STRING: 0x03,
|
|
62
|
+
DATE: 0x04,
|
|
63
|
+
TIMESTAMP: 0x05,
|
|
64
|
+
CLASS: 0x06,
|
|
65
|
+
DOUBLE: 0x07,
|
|
66
|
+
FLOAT: 0x08,
|
|
67
|
+
LIST: 0x09,
|
|
68
|
+
MAP: 0x0a,
|
|
69
|
+
SET: 0x0b,
|
|
70
|
+
UUID: 0x0c,
|
|
71
|
+
EDGE: 0x0d,
|
|
72
|
+
PATH: 0x0e,
|
|
73
|
+
PROPERTY: 0x0f,
|
|
74
|
+
GRAPH: 0x10,
|
|
75
|
+
VERTEX: 0x11,
|
|
76
|
+
VERTEXPROPERTY: 0x12,
|
|
77
|
+
BARRIER: 0x13,
|
|
78
|
+
BINDING: 0x14,
|
|
79
|
+
BYTECODE: 0x15,
|
|
80
|
+
CARDINALITY: 0x16,
|
|
81
|
+
COLUMN: 0x17,
|
|
82
|
+
DIRECTION: 0x18,
|
|
83
|
+
OPERATOR: 0x19,
|
|
84
|
+
ORDER: 0x1a,
|
|
85
|
+
PICK: 0x1b,
|
|
86
|
+
POP: 0x1c,
|
|
87
|
+
LAMBDA: 0x1d,
|
|
88
|
+
P: 0x1e,
|
|
89
|
+
SCOPE: 0x1f,
|
|
90
|
+
T: 0x20,
|
|
91
|
+
TRAVERSER: 0x21,
|
|
92
|
+
BIGDECIMAL: 0x22,
|
|
93
|
+
BIGINTEGER: 0x23,
|
|
94
|
+
BYTE: 0x24,
|
|
95
|
+
BYTEBUFFER: 0x25,
|
|
96
|
+
SHORT: 0x26,
|
|
97
|
+
BOOLEAN: 0x27,
|
|
98
|
+
TEXTP: 0x28,
|
|
99
|
+
TRAVERSALSTRATEGY: 0x29,
|
|
100
|
+
BULKSET: 0x2a,
|
|
101
|
+
TREE: 0x2b,
|
|
102
|
+
METRICS: 0x2c,
|
|
103
|
+
TRAVERSALMETRICS: 0x2d,
|
|
104
|
+
MERGE: 0x2e,
|
|
105
|
+
|
|
106
|
+
CHAR: 0x80,
|
|
107
|
+
DURATION: 0x81,
|
|
108
|
+
INETADDRESS: 0x82,
|
|
109
|
+
INSTANT: 0x83,
|
|
110
|
+
LOCALDATE: 0x84,
|
|
111
|
+
LOCALDATETIME: 0x85,
|
|
112
|
+
LOCALTIME: 0x86,
|
|
113
|
+
MONTHDAY: 0x87,
|
|
114
|
+
OFFSETDATETIME: 0x88,
|
|
115
|
+
OFFSETTIME: 0x89,
|
|
116
|
+
PERIOD: 0x8a,
|
|
117
|
+
YEAR: 0x8b,
|
|
118
|
+
YEARMONTH: 0x8c,
|
|
119
|
+
ZONEDATETIME: 0x8d,
|
|
120
|
+
ZONEOFFSET: 0x8e,
|
|
121
|
+
|
|
122
|
+
CUSTOM: 0,
|
|
123
|
+
UNSPECIFIED_NULL: 0xfe,
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
module.exports = DataType;
|
|
127
|
+
</code></pre>
|
|
128
|
+
</article>
|
|
129
|
+
</section>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<nav>
|
|
137
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
138
|
+
</nav>
|
|
139
|
+
|
|
140
|
+
<br class="clear">
|
|
141
|
+
|
|
142
|
+
<footer>
|
|
143
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
144
|
+
</footer>
|
|
145
|
+
|
|
146
|
+
<script> prettyPrint(); </script>
|
|
147
|
+
<script src="scripts/linenumber.js"> </script>
|
|
148
|
+
</body>
|
|
149
|
+
</html>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: structure/io/binary/internals/GraphBinaryReader.js</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: structure/io/binary/internals/GraphBinaryReader.js</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>/*
|
|
30
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
31
|
+
* or more contributor license agreements. See the NOTICE file
|
|
32
|
+
* distributed with this work for additional information
|
|
33
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
34
|
+
* to you under the Apache License, Version 2.0 (the
|
|
35
|
+
* "License"); you may not use this file except in compliance
|
|
36
|
+
* with the License. You may obtain a copy of the License at
|
|
37
|
+
*
|
|
38
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39
|
+
*
|
|
40
|
+
* Unless required by applicable law or agreed to in writing,
|
|
41
|
+
* software distributed under the License is distributed on an
|
|
42
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
43
|
+
* KIND, either express or implied. See the License for the
|
|
44
|
+
* specific language governing permissions and limitations
|
|
45
|
+
* under the License.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @author Igor Ostapenko
|
|
50
|
+
*/
|
|
51
|
+
'use strict';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* GraphBinary reader.
|
|
55
|
+
*/
|
|
56
|
+
module.exports = class GraphBinaryReader {
|
|
57
|
+
constructor(ioc) {
|
|
58
|
+
this.ioc = ioc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
readResponse(buffer) {
|
|
62
|
+
if (buffer === undefined || buffer === null) {
|
|
63
|
+
throw new Error('Buffer is missing.');
|
|
64
|
+
}
|
|
65
|
+
if (!(buffer instanceof Buffer)) {
|
|
66
|
+
throw new Error('Not an instance of Buffer.');
|
|
67
|
+
}
|
|
68
|
+
if (buffer.length < 1) {
|
|
69
|
+
throw new Error('Buffer is empty.');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const response = { status: {}, result: {} };
|
|
73
|
+
let cursor = buffer;
|
|
74
|
+
let len;
|
|
75
|
+
|
|
76
|
+
// {version} is a Byte representing the protocol version
|
|
77
|
+
const version = cursor[0];
|
|
78
|
+
if (version !== 0x81) {
|
|
79
|
+
throw new Error(`Unsupported version '${version}'.`);
|
|
80
|
+
}
|
|
81
|
+
cursor = cursor.slice(1); // skip version
|
|
82
|
+
|
|
83
|
+
// {request_id} is a nullable UUID
|
|
84
|
+
({ v: response.requestId, len } = this.ioc.uuidSerializer.deserialize(cursor, false, true));
|
|
85
|
+
cursor = cursor.slice(len);
|
|
86
|
+
|
|
87
|
+
// {status_code} is an Int
|
|
88
|
+
({ v: response.status.code, len } = this.ioc.intSerializer.deserialize(cursor, false));
|
|
89
|
+
cursor = cursor.slice(len);
|
|
90
|
+
|
|
91
|
+
// {status_message} is a nullable String
|
|
92
|
+
({ v: response.status.message, len } = this.ioc.stringSerializer.deserialize(cursor, false, true));
|
|
93
|
+
cursor = cursor.slice(len);
|
|
94
|
+
|
|
95
|
+
// {status_attributes} is a Map
|
|
96
|
+
({ v: response.status.attributes, len } = this.ioc.mapSerializer.deserialize(cursor, false));
|
|
97
|
+
cursor = cursor.slice(len);
|
|
98
|
+
|
|
99
|
+
// {result_meta} is a Map
|
|
100
|
+
({ v: response.result.meta, len } = this.ioc.mapSerializer.deserialize(cursor, false));
|
|
101
|
+
cursor = cursor.slice(len);
|
|
102
|
+
|
|
103
|
+
// {result_data} is a fully qualified typed value composed of {type_code}{type_info}{value_flag}{value}
|
|
104
|
+
({ v: response.result.data } = this.ioc.anySerializer.deserialize(cursor));
|
|
105
|
+
|
|
106
|
+
return response;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
</code></pre>
|
|
110
|
+
</article>
|
|
111
|
+
</section>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<nav>
|
|
119
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
120
|
+
</nav>
|
|
121
|
+
|
|
122
|
+
<br class="clear">
|
|
123
|
+
|
|
124
|
+
<footer>
|
|
125
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
126
|
+
</footer>
|
|
127
|
+
|
|
128
|
+
<script> prettyPrint(); </script>
|
|
129
|
+
<script src="scripts/linenumber.js"> </script>
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: structure/io/binary/internals/GraphBinaryWriter.js</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: structure/io/binary/internals/GraphBinaryWriter.js</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>/*
|
|
30
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
31
|
+
* or more contributor license agreements. See the NOTICE file
|
|
32
|
+
* distributed with this work for additional information
|
|
33
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
34
|
+
* to you under the Apache License, Version 2.0 (the
|
|
35
|
+
* "License"); you may not use this file except in compliance
|
|
36
|
+
* with the License. You may obtain a copy of the License at
|
|
37
|
+
*
|
|
38
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39
|
+
*
|
|
40
|
+
* Unless required by applicable law or agreed to in writing,
|
|
41
|
+
* software distributed under the License is distributed on an
|
|
42
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
43
|
+
* KIND, either express or implied. See the License for the
|
|
44
|
+
* specific language governing permissions and limitations
|
|
45
|
+
* under the License.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @author Igor Ostapenko
|
|
50
|
+
*/
|
|
51
|
+
'use strict';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* GraphBinary writer.
|
|
55
|
+
*/
|
|
56
|
+
module.exports = class GraphBinaryWriter {
|
|
57
|
+
constructor(ioc) {
|
|
58
|
+
this.ioc = ioc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
writeRequest({ requestId, op, processor, args }) {
|
|
62
|
+
const bufs = [
|
|
63
|
+
// {version} 1 byte
|
|
64
|
+
Buffer.from([0x81]),
|
|
65
|
+
// {request_id} UUID
|
|
66
|
+
this.ioc.uuidSerializer.serialize(requestId, false),
|
|
67
|
+
// {op} String
|
|
68
|
+
this.ioc.stringSerializer.serialize(op, false),
|
|
69
|
+
// {processor} String
|
|
70
|
+
this.ioc.stringSerializer.serialize(processor, false),
|
|
71
|
+
// {args} Map
|
|
72
|
+
this.ioc.mapSerializer.serialize(args, false),
|
|
73
|
+
];
|
|
74
|
+
return Buffer.concat(bufs);
|
|
75
|
+
|
|
76
|
+
/*// Detailed example for a quick reference:
|
|
77
|
+
// {version}
|
|
78
|
+
0x81,
|
|
79
|
+
// {request_id} UUID
|
|
80
|
+
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
|
81
|
+
// {op} String
|
|
82
|
+
0x00,0x00,0x00,0x08, ...Buffer.from('bytecode'),
|
|
83
|
+
// {processor} String
|
|
84
|
+
0x00,0x00,0x00,0x09, ...Buffer.from('traversal'),
|
|
85
|
+
// {args} Map
|
|
86
|
+
0x00,0x00,0x00,0x02,
|
|
87
|
+
// 1.
|
|
88
|
+
// args.aliases key String
|
|
89
|
+
0x03,0x00, 0x00,0x00,0x00,0x07, ...Buffer.from('aliases'),
|
|
90
|
+
// args.aliases value Map
|
|
91
|
+
0x0A,0x00, 0x00,0x00,0x00,0x01,
|
|
92
|
+
// aliases.g key String
|
|
93
|
+
0x03,0x00, 0x00,0x00,0x00,0x01, ...Buffer.from('g'),
|
|
94
|
+
// aliases.g value String
|
|
95
|
+
0x03,0x00, 0x00,0x00,0x00,0x01, ...Buffer.from('g'),
|
|
96
|
+
// 2.
|
|
97
|
+
// args.gremlin key String
|
|
98
|
+
0x03,0x00, 0x00,0x00,0x00,0x07, ...Buffer.from('gremlin'),
|
|
99
|
+
// args.gremlin value Bytecode
|
|
100
|
+
0x15,0x00,
|
|
101
|
+
// {steps_length}
|
|
102
|
+
0x00,0x00,0x00,0x01,
|
|
103
|
+
// step 1 - {name} String
|
|
104
|
+
0x00,0x00,0x00,0x01, ...Buffer.from('V'),
|
|
105
|
+
// step 1 - {values_length} Int
|
|
106
|
+
0x00,0x00,0x00,0x00,
|
|
107
|
+
// {sources_length}
|
|
108
|
+
0x00,0x00,0x00,0x00,
|
|
109
|
+
*/
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
</code></pre>
|
|
113
|
+
</article>
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<nav>
|
|
122
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
123
|
+
</nav>
|
|
124
|
+
|
|
125
|
+
<br class="clear">
|
|
126
|
+
|
|
127
|
+
<footer>
|
|
128
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
129
|
+
</footer>
|
|
130
|
+
|
|
131
|
+
<script> prettyPrint(); </script>
|
|
132
|
+
<script src="scripts/linenumber.js"> </script>
|
|
133
|
+
</body>
|
|
134
|
+
</html>
|
|
@@ -336,13 +336,13 @@ module.exports = {
|
|
|
336
336
|
</div>
|
|
337
337
|
|
|
338
338
|
<nav>
|
|
339
|
-
<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>
|
|
339
|
+
<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="module.exports.html">exports</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="SeedStrategy.html">SeedStrategy</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#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li></ul>
|
|
340
340
|
</nav>
|
|
341
341
|
|
|
342
342
|
<br class="clear">
|
|
343
343
|
|
|
344
344
|
<footer>
|
|
345
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
345
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 26 2022 16:12:54 GMT-0400 (Eastern Daylight Time)
|
|
346
346
|
</footer>
|
|
347
347
|
|
|
348
348
|
<script> prettyPrint(); </script>
|