gremlin 3.6.6 → 3.6.7

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 (75) hide show
  1. package/NOTICE +1 -1
  2. package/doc/AnonymousTraversalSource.html +1 -1
  3. package/doc/Authenticator.html +1 -1
  4. package/doc/Bytecode.html +1 -1
  5. package/doc/CardinalityValue.html +2 -2
  6. package/doc/Client.html +1 -1
  7. package/doc/Connection.html +1 -1
  8. package/doc/DataType.js.html +149 -0
  9. package/doc/DriverRemoteConnection.html +1 -1
  10. package/doc/EdgeLabelVerificationStrategy.html +1 -1
  11. package/doc/Graph.html +1 -1
  12. package/doc/GraphBinaryReader.js.html +132 -0
  13. package/doc/GraphBinaryWriter.js.html +135 -0
  14. package/doc/GraphSON2Reader.html +1 -1
  15. package/doc/GraphSON2Writer.html +1 -1
  16. package/doc/GraphSON3Reader.html +1 -1
  17. package/doc/GraphSON3Writer.html +1 -1
  18. package/doc/GraphTraversal.html +1 -1
  19. package/doc/GraphTraversalSource.html +1 -1
  20. package/doc/HaltedTraverserStrategy.html +1 -1
  21. package/doc/MatchAlgorithmStrategy.html +1 -1
  22. package/doc/P.html +1 -1
  23. package/doc/PartitionStrategy.html +1 -1
  24. package/doc/Path.html +1 -1
  25. package/doc/PlainTextSaslAuthenticator.html +1 -1
  26. package/doc/ProductiveByStrategy.html +1 -1
  27. package/doc/RemoteConnection.html +1 -1
  28. package/doc/RemoteStrategy.html +1 -1
  29. package/doc/RemoteTraversal.html +1 -1
  30. package/doc/ReservedKeysVerificationStrategy.html +1 -1
  31. package/doc/ResponseError.html +1 -1
  32. package/doc/ResultSet.html +1 -1
  33. package/doc/SaslAuthenticator.html +1 -1
  34. package/doc/SaslMechanismBase.html +1 -1
  35. package/doc/SaslMechanismPlain.html +1 -1
  36. package/doc/SeedStrategy.html +1 -1
  37. package/doc/SubgraphStrategy.html +1 -1
  38. package/doc/TextP.html +1 -1
  39. package/doc/Transaction.html +4 -4
  40. package/doc/Translator.html +1 -1
  41. package/doc/TraversalStrategies.html +1 -1
  42. package/doc/TraversalStrategy.html +1 -1
  43. package/doc/TypeSerializer.html +1 -1
  44. package/doc/driver_auth_authenticator.js.html +1 -1
  45. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +1 -1
  46. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +1 -1
  47. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +1 -1
  48. package/doc/driver_auth_sasl-authenticator.js.html +1 -1
  49. package/doc/driver_client.js.html +1 -1
  50. package/doc/driver_connection.js.html +1 -1
  51. package/doc/driver_driver-remote-connection.js.html +1 -1
  52. package/doc/driver_remote-connection.js.html +1 -1
  53. package/doc/driver_response-error.js.html +1 -1
  54. package/doc/driver_result-set.js.html +1 -1
  55. package/doc/global.html +1 -1
  56. package/doc/index.html +1 -1
  57. package/doc/module.exports.html +1 -1
  58. package/doc/process_anonymous-traversal.js.html +1 -1
  59. package/doc/process_bytecode.js.html +1 -1
  60. package/doc/process_graph-traversal.js.html +1 -1
  61. package/doc/process_transaction.js.html +11 -3
  62. package/doc/process_translator.js.html +1 -1
  63. package/doc/process_traversal-strategy.js.html +1 -1
  64. package/doc/process_traversal.js.html +1 -1
  65. package/doc/structure_graph.js.html +1 -1
  66. package/doc/structure_io_binary_internals_DataType.js.html +1 -1
  67. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +1 -1
  68. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +1 -1
  69. package/doc/structure_io_graph-serializer.js.html +1 -1
  70. package/doc/structure_io_type-serializers.js.html +1 -1
  71. package/doc/utils.js.html +181 -0
  72. package/docker-compose.yml +1 -1
  73. package/lib/process/transaction.js +10 -2
  74. package/lib/utils.js +1 -1
  75. package/package.json +3 -3
package/NOTICE CHANGED
@@ -1,5 +1,5 @@
1
1
  Apache TinkerPop
2
- Copyright 2015-2023 The Apache Software Foundation.
2
+ Copyright 2015-2024 The Apache Software Foundation.
3
3
 
4
4
  This product includes software developed at
5
5
  The Apache Software Foundation (http://www.apache.org/).
@@ -722,7 +722,7 @@ reference so that traversals spawned from it will execute over that reference.
722
722
  <br class="clear">
723
723
 
724
724
  <footer>
725
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
725
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
726
726
  </footer>
727
727
 
728
728
  <script> prettyPrint(); </script>
@@ -294,7 +294,7 @@
294
294
  <br class="clear">
295
295
 
296
296
  <footer>
297
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
297
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
298
298
  </footer>
299
299
 
300
300
  <script> prettyPrint(); </script>
package/doc/Bytecode.html CHANGED
@@ -932,7 +932,7 @@
932
932
  <br class="clear">
933
933
 
934
934
  <footer>
935
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
935
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
936
936
  </footer>
937
937
 
938
938
  <script> prettyPrint(); </script>
@@ -696,13 +696,13 @@
696
696
  </div>
697
697
 
698
698
  <nav>
699
- <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="CardinalityValue.html">CardinalityValue</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>
699
+ <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="CardinalityValue.html">CardinalityValue</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><li><a href="global.html#toArrayBuffer">toArrayBuffer</a></li></ul>
700
700
  </nav>
701
701
 
702
702
  <br class="clear">
703
703
 
704
704
  <footer>
705
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Nov 21 2023 11:49:14 GMT-0800 (Pacific Standard Time)
705
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 09 2024 22:21:12 GMT-0700 (Pacific Daylight Time)
706
706
  </footer>
707
707
 
708
708
  <script> prettyPrint(); </script>
package/doc/Client.html CHANGED
@@ -1893,7 +1893,7 @@ send session close request before connection close if session mode
1893
1893
  <br class="clear">
1894
1894
 
1895
1895
  <footer>
1896
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
1896
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
1897
1897
  </footer>
1898
1898
 
1899
1899
  <script> prettyPrint(); </script>
@@ -1337,7 +1337,7 @@
1337
1337
  <br class="clear">
1338
1338
 
1339
1339
  <footer>
1340
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
1340
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
1341
1341
  </footer>
1342
1342
 
1343
1343
  <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: 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: 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
+
52
+ /**
53
+ * Represents a GraphBinary data type.
54
+ *
55
+ * See org.apache.tinkerpop.gremlin.structure.io.binary.DataType Java class.
56
+ */
57
+ const DataType = {
58
+ INT: 0x01,
59
+ LONG: 0x02,
60
+ STRING: 0x03,
61
+ DATE: 0x04,
62
+ TIMESTAMP: 0x05,
63
+ CLASS: 0x06,
64
+ DOUBLE: 0x07,
65
+ FLOAT: 0x08,
66
+ LIST: 0x09,
67
+ MAP: 0x0a,
68
+ SET: 0x0b,
69
+ UUID: 0x0c,
70
+ EDGE: 0x0d,
71
+ PATH: 0x0e,
72
+ PROPERTY: 0x0f,
73
+ GRAPH: 0x10,
74
+ VERTEX: 0x11,
75
+ VERTEXPROPERTY: 0x12,
76
+ BARRIER: 0x13,
77
+ BINDING: 0x14,
78
+ BYTECODE: 0x15,
79
+ CARDINALITY: 0x16,
80
+ COLUMN: 0x17,
81
+ DIRECTION: 0x18,
82
+ OPERATOR: 0x19,
83
+ ORDER: 0x1a,
84
+ PICK: 0x1b,
85
+ POP: 0x1c,
86
+ LAMBDA: 0x1d,
87
+ P: 0x1e,
88
+ SCOPE: 0x1f,
89
+ T: 0x20,
90
+ TRAVERSER: 0x21,
91
+ BIGDECIMAL: 0x22,
92
+ BIGINTEGER: 0x23,
93
+ BYTE: 0x24,
94
+ BYTEBUFFER: 0x25,
95
+ SHORT: 0x26,
96
+ BOOLEAN: 0x27,
97
+ TEXTP: 0x28,
98
+ TRAVERSALSTRATEGY: 0x29,
99
+ BULKSET: 0x2a,
100
+ TREE: 0x2b,
101
+ METRICS: 0x2c,
102
+ TRAVERSALMETRICS: 0x2d,
103
+ MERGE: 0x2e,
104
+ DT: 0x2f,
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
+ export default 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="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#DataType">DataType</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 Mon Apr 08 2024 22:33:46 GMT-0700 (Pacific Daylight Time)
144
+ </footer>
145
+
146
+ <script> prettyPrint(); </script>
147
+ <script src="scripts/linenumber.js"> </script>
148
+ </body>
149
+ </html>
@@ -1552,7 +1552,7 @@
1552
1552
  <br class="clear">
1553
1553
 
1554
1554
  <footer>
1555
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
1555
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
1556
1556
  </footer>
1557
1557
 
1558
1558
  <script> prettyPrint(); </script>
@@ -243,7 +243,7 @@
243
243
  <br class="clear">
244
244
 
245
245
  <footer>
246
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
246
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
247
247
  </footer>
248
248
 
249
249
  <script> prettyPrint(); </script>
package/doc/Graph.html CHANGED
@@ -334,7 +334,7 @@
334
334
  <br class="clear">
335
335
 
336
336
  <footer>
337
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
337
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
338
338
  </footer>
339
339
 
340
340
  <script> prettyPrint(); </script>
@@ -0,0 +1,132 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: 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: 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
+
52
+ import { Buffer } from 'buffer';
53
+
54
+ /**
55
+ * GraphBinary reader.
56
+ */
57
+ export default class GraphBinaryReader {
58
+ constructor(ioc) {
59
+ this.ioc = ioc;
60
+ }
61
+
62
+ readResponse(buffer) {
63
+ if (buffer === undefined || buffer === null) {
64
+ throw new Error('Buffer is missing.');
65
+ }
66
+ if (!(buffer instanceof Buffer)) {
67
+ throw new Error('Not an instance of Buffer.');
68
+ }
69
+ if (buffer.length &lt; 1) {
70
+ throw new Error('Buffer is empty.');
71
+ }
72
+
73
+ const response = { status: {}, result: {} };
74
+ let cursor = buffer;
75
+ let len;
76
+
77
+ // {version} is a Byte representing the protocol version
78
+ const version = cursor[0];
79
+ if (version !== 0x81) {
80
+ throw new Error(`Unsupported version '${version}'.`);
81
+ }
82
+ cursor = cursor.slice(1); // skip version
83
+
84
+ // {request_id} is a nullable UUID
85
+ ({ v: response.requestId, len } = this.ioc.uuidSerializer.deserialize(cursor, false, true));
86
+ cursor = cursor.slice(len);
87
+
88
+ // {status_code} is an Int
89
+ ({ v: response.status.code, len } = this.ioc.intSerializer.deserialize(cursor, false));
90
+ cursor = cursor.slice(len);
91
+
92
+ // {status_message} is a nullable String
93
+ ({ v: response.status.message, len } = this.ioc.stringSerializer.deserialize(cursor, false, true));
94
+ cursor = cursor.slice(len);
95
+
96
+ // {status_attributes} is a Map
97
+ ({ v: response.status.attributes, len } = this.ioc.mapSerializer.deserialize(cursor, false));
98
+ cursor = cursor.slice(len);
99
+
100
+ // {result_meta} is a Map
101
+ ({ v: response.result.meta, len } = this.ioc.mapSerializer.deserialize(cursor, false));
102
+ cursor = cursor.slice(len);
103
+
104
+ // {result_data} is a fully qualified typed value composed of {type_code}{type_info}{value_flag}{value}
105
+ ({ v: response.result.data } = this.ioc.anySerializer.deserialize(cursor));
106
+
107
+ return response;
108
+ }
109
+ }
110
+ </code></pre>
111
+ </article>
112
+ </section>
113
+
114
+
115
+
116
+
117
+ </div>
118
+
119
+ <nav>
120
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#DataType">DataType</a></li></ul>
121
+ </nav>
122
+
123
+ <br class="clear">
124
+
125
+ <footer>
126
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 08 2024 22:33:46 GMT-0700 (Pacific Daylight Time)
127
+ </footer>
128
+
129
+ <script> prettyPrint(); </script>
130
+ <script src="scripts/linenumber.js"> </script>
131
+ </body>
132
+ </html>
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: 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: 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
+
52
+ import { Buffer } from 'buffer';
53
+
54
+ /**
55
+ * GraphBinary writer.
56
+ */
57
+ export default class GraphBinaryWriter {
58
+ constructor(ioc) {
59
+ this.ioc = ioc;
60
+ }
61
+
62
+ writeRequest({ requestId, op, processor, args }) {
63
+ const bufs = [
64
+ // {version} 1 byte
65
+ Buffer.from([0x81]),
66
+ // {request_id} UUID
67
+ this.ioc.uuidSerializer.serialize(requestId, false),
68
+ // {op} String
69
+ this.ioc.stringSerializer.serialize(op, false),
70
+ // {processor} String
71
+ this.ioc.stringSerializer.serialize(processor, false),
72
+ // {args} Map
73
+ this.ioc.mapSerializer.serialize(args, false),
74
+ ];
75
+ return Buffer.concat(bufs);
76
+
77
+ /*// Detailed example for a quick reference:
78
+ // {version}
79
+ 0x81,
80
+ // {request_id} UUID
81
+ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
82
+ // {op} String
83
+ 0x00,0x00,0x00,0x08, ...Buffer.from('bytecode'),
84
+ // {processor} String
85
+ 0x00,0x00,0x00,0x09, ...Buffer.from('traversal'),
86
+ // {args} Map
87
+ 0x00,0x00,0x00,0x02,
88
+ // 1.
89
+ // args.aliases key String
90
+ 0x03,0x00, 0x00,0x00,0x00,0x07, ...Buffer.from('aliases'),
91
+ // args.aliases value Map
92
+ 0x0A,0x00, 0x00,0x00,0x00,0x01,
93
+ // aliases.g key String
94
+ 0x03,0x00, 0x00,0x00,0x00,0x01, ...Buffer.from('g'),
95
+ // aliases.g value String
96
+ 0x03,0x00, 0x00,0x00,0x00,0x01, ...Buffer.from('g'),
97
+ // 2.
98
+ // args.gremlin key String
99
+ 0x03,0x00, 0x00,0x00,0x00,0x07, ...Buffer.from('gremlin'),
100
+ // args.gremlin value Bytecode
101
+ 0x15,0x00,
102
+ // {steps_length}
103
+ 0x00,0x00,0x00,0x01,
104
+ // step 1 - {name} String
105
+ 0x00,0x00,0x00,0x01, ...Buffer.from('V'),
106
+ // step 1 - {values_length} Int
107
+ 0x00,0x00,0x00,0x00,
108
+ // {sources_length}
109
+ 0x00,0x00,0x00,0x00,
110
+ */
111
+ }
112
+ }
113
+ </code></pre>
114
+ </article>
115
+ </section>
116
+
117
+
118
+
119
+
120
+ </div>
121
+
122
+ <nav>
123
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#DataType">DataType</a></li></ul>
124
+ </nav>
125
+
126
+ <br class="clear">
127
+
128
+ <footer>
129
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 08 2024 22:33:46 GMT-0700 (Pacific Daylight Time)
130
+ </footer>
131
+
132
+ <script> prettyPrint(); </script>
133
+ <script src="scripts/linenumber.js"> </script>
134
+ </body>
135
+ </html>
@@ -398,7 +398,7 @@ deserializer instances as values, ie: { 'g:Int64': longSerializer }.</td>
398
398
  <br class="clear">
399
399
 
400
400
  <footer>
401
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
401
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
402
402
  </footer>
403
403
 
404
404
  <script> prettyPrint(); </script>
@@ -549,7 +549,7 @@ serializer instances as values, ie: { 'g:Int64': longSerializer }.</td>
549
549
  <br class="clear">
550
550
 
551
551
  <footer>
552
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
552
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
553
553
  </footer>
554
554
 
555
555
  <script> prettyPrint(); </script>
@@ -161,7 +161,7 @@
161
161
  <br class="clear">
162
162
 
163
163
  <footer>
164
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
164
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
165
165
  </footer>
166
166
 
167
167
  <script> prettyPrint(); </script>
@@ -161,7 +161,7 @@
161
161
  <br class="clear">
162
162
 
163
163
  <footer>
164
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
164
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
165
165
  </footer>
166
166
 
167
167
  <script> prettyPrint(); </script>
@@ -18289,7 +18289,7 @@
18289
18289
  <br class="clear">
18290
18290
 
18291
18291
  <footer>
18292
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
18292
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
18293
18293
  </footer>
18294
18294
 
18295
18295
  <script> prettyPrint(); </script>
@@ -3658,7 +3658,7 @@
3658
3658
  <br class="clear">
3659
3659
 
3660
3660
  <footer>
3661
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
3661
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
3662
3662
  </footer>
3663
3663
 
3664
3664
  <script> prettyPrint(); </script>
@@ -206,7 +206,7 @@
206
206
  <br class="clear">
207
207
 
208
208
  <footer>
209
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
209
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
210
210
  </footer>
211
211
 
212
212
  <script> prettyPrint(); </script>
@@ -201,7 +201,7 @@
201
201
  <br class="clear">
202
202
 
203
203
  <footer>
204
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
204
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
205
205
  </footer>
206
206
 
207
207
  <script> prettyPrint(); </script>
package/doc/P.html CHANGED
@@ -1866,7 +1866,7 @@
1866
1866
  <br class="clear">
1867
1867
 
1868
1868
  <footer>
1869
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
1869
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
1870
1870
  </footer>
1871
1871
 
1872
1872
  <script> prettyPrint(); </script>
@@ -378,7 +378,7 @@
378
378
  <br class="clear">
379
379
 
380
380
  <footer>
381
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
381
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
382
382
  </footer>
383
383
 
384
384
  <script> prettyPrint(); </script>
package/doc/Path.html CHANGED
@@ -233,7 +233,7 @@
233
233
  <br class="clear">
234
234
 
235
235
  <footer>
236
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
236
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 07:56:40 GMT-0700 (Pacific Daylight Time)
237
237
  </footer>
238
238
 
239
239
  <script> prettyPrint(); </script>