gremlin 3.7.4 → 3.7.5

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/doc/AnonymousTraversalSource.html +1 -1
  2. package/doc/Authenticator.html +1 -1
  3. package/doc/Bytecode.html +1 -1
  4. package/doc/CardinalityValue.html +1 -1
  5. package/doc/Client.html +1 -1
  6. package/doc/Connection.html +4 -4
  7. package/doc/DataType.js.html +150 -0
  8. package/doc/DriverRemoteConnection.html +1 -1
  9. package/doc/EdgeLabelVerificationStrategy.html +1 -1
  10. package/doc/Graph.html +1 -1
  11. package/doc/GraphBinaryReader.js.html +132 -0
  12. package/doc/GraphBinaryWriter.js.html +135 -0
  13. package/doc/GraphSON2Reader.html +1 -1
  14. package/doc/GraphSON2Writer.html +1 -1
  15. package/doc/GraphSON3Reader.html +1 -1
  16. package/doc/GraphSON3Writer.html +1 -1
  17. package/doc/GraphTraversal.html +1 -1
  18. package/doc/GraphTraversalSource.html +1 -1
  19. package/doc/HaltedTraverserStrategy.html +1 -1
  20. package/doc/MatchAlgorithmStrategy.html +1 -1
  21. package/doc/P.html +1 -1
  22. package/doc/PartitionStrategy.html +1 -1
  23. package/doc/Path.html +2 -2
  24. package/doc/PlainTextSaslAuthenticator.html +1 -1
  25. package/doc/ProductiveByStrategy.html +1 -1
  26. package/doc/RemoteConnection.html +1 -1
  27. package/doc/RemoteStrategy.html +1 -1
  28. package/doc/RemoteTraversal.html +1 -1
  29. package/doc/ReservedKeysVerificationStrategy.html +1 -1
  30. package/doc/ResponseError.html +1 -1
  31. package/doc/ResultSet.html +1 -1
  32. package/doc/SaslAuthenticator.html +1 -1
  33. package/doc/SaslMechanismBase.html +1 -1
  34. package/doc/SaslMechanismPlain.html +1 -1
  35. package/doc/SeedStrategy.html +1 -1
  36. package/doc/SubgraphStrategy.html +1 -1
  37. package/doc/TextP.html +1 -1
  38. package/doc/Transaction.html +1 -1
  39. package/doc/Translator.html +1 -1
  40. package/doc/TraversalStrategies.html +1 -1
  41. package/doc/TraversalStrategy.html +1 -1
  42. package/doc/TypeSerializer.html +1 -1
  43. package/doc/driver_auth_authenticator.js.html +1 -1
  44. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +1 -1
  45. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +1 -1
  46. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +1 -1
  47. package/doc/driver_auth_sasl-authenticator.js.html +1 -1
  48. package/doc/driver_client.js.html +1 -1
  49. package/doc/driver_connection.js.html +15 -4
  50. package/doc/driver_driver-remote-connection.js.html +1 -1
  51. package/doc/driver_remote-connection.js.html +1 -1
  52. package/doc/driver_response-error.js.html +1 -1
  53. package/doc/driver_result-set.js.html +1 -1
  54. package/doc/global.html +1 -1
  55. package/doc/index.html +1 -1
  56. package/doc/module.exports.html +1 -1
  57. package/doc/process_anonymous-traversal.js.html +1 -1
  58. package/doc/process_bytecode.js.html +1 -1
  59. package/doc/process_graph-traversal.js.html +7 -1
  60. package/doc/process_transaction.js.html +1 -1
  61. package/doc/process_translator.js.html +1 -1
  62. package/doc/process_traversal-strategy.js.html +1 -1
  63. package/doc/process_traversal.js.html +1 -1
  64. package/doc/structure_graph.js.html +7 -5
  65. package/doc/structure_io_binary_internals_DataType.js.html +1 -1
  66. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +1 -1
  67. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +1 -1
  68. package/doc/structure_io_graph-serializer.js.html +1 -1
  69. package/doc/structure_io_type-serializers.js.html +1 -1
  70. package/doc/utils.js.html +2 -2
  71. package/lib/driver/connection.js +14 -3
  72. package/lib/process/graph-traversal.js +6 -0
  73. package/lib/structure/graph.js +6 -4
  74. package/lib/utils.js +1 -1
  75. package/package.json +1 -1
@@ -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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
725
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
297
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
935
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
936
936
  </footer>
937
937
 
938
938
  <script> prettyPrint(); </script>
@@ -702,7 +702,7 @@
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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
705
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
706
706
  </footer>
707
707
 
708
708
  <script> prettyPrint(); </script>
package/doc/Client.html CHANGED
@@ -1860,7 +1860,7 @@ send session close request before connection close if session mode
1860
1860
  <br class="clear">
1861
1861
 
1862
1862
  <footer>
1863
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
1863
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
1864
1864
  </footer>
1865
1865
 
1866
1866
  <script> prettyPrint(); </script>
@@ -839,7 +839,7 @@
839
839
 
840
840
  <dt class="tag-source">Source:</dt>
841
841
  <dd class="tag-source"><ul class="dummy"><li>
842
- <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line439">line 439</a>
842
+ <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line450">line 450</a>
843
843
  </li></ul></dd>
844
844
 
845
845
 
@@ -1047,7 +1047,7 @@
1047
1047
 
1048
1048
  <dt class="tag-source">Source:</dt>
1049
1049
  <dd class="tag-source"><ul class="dummy"><li>
1050
- <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line207">line 207</a>
1050
+ <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line212">line 212</a>
1051
1051
  </li></ul></dd>
1052
1052
 
1053
1053
 
@@ -1131,7 +1131,7 @@
1131
1131
 
1132
1132
  <dt class="tag-source">Source:</dt>
1133
1133
  <dd class="tag-source"><ul class="dummy"><li>
1134
- <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line174">line 174</a>
1134
+ <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line179">line 179</a>
1135
1135
  </li></ul></dd>
1136
1136
 
1137
1137
 
@@ -1183,7 +1183,7 @@
1183
1183
  <br class="clear">
1184
1184
 
1185
1185
  <footer>
1186
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
1186
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
1187
1187
  </footer>
1188
1188
 
1189
1189
  <script> prettyPrint(); </script>
@@ -0,0 +1,150 @@
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
+ GTYPE: 0x30,
106
+
107
+ CHAR: 0x80,
108
+ DURATION: 0x81,
109
+ INETADDRESS: 0x82,
110
+ INSTANT: 0x83,
111
+ LOCALDATE: 0x84,
112
+ LOCALDATETIME: 0x85,
113
+ LOCALTIME: 0x86,
114
+ MONTHDAY: 0x87,
115
+ OFFSETDATETIME: 0x88,
116
+ OFFSETTIME: 0x89,
117
+ PERIOD: 0x8a,
118
+ YEAR: 0x8b,
119
+ YEARMONTH: 0x8c,
120
+ ZONEDATETIME: 0x8d,
121
+ ZONEOFFSET: 0x8e,
122
+
123
+ CUSTOM: 0,
124
+ UNSPECIFIED_NULL: 0xfe,
125
+ };
126
+
127
+ export default DataType;
128
+ </code></pre>
129
+ </article>
130
+ </section>
131
+
132
+
133
+
134
+
135
+ </div>
136
+
137
+ <nav>
138
+ <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>
139
+ </nav>
140
+
141
+ <br class="clear">
142
+
143
+ <footer>
144
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 10 2025 14:42:27 GMT-0800 (Pacific Standard Time)
145
+ </footer>
146
+
147
+ <script> prettyPrint(); </script>
148
+ <script src="scripts/linenumber.js"> </script>
149
+ </body>
150
+ </html>
@@ -1519,7 +1519,7 @@
1519
1519
  <br class="clear">
1520
1520
 
1521
1521
  <footer>
1522
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
1522
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
1523
1523
  </footer>
1524
1524
 
1525
1525
  <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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
246
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
337
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Nov 10 2025 14:42:27 GMT-0800 (Pacific Standard 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 Nov 10 2025 14:42:27 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
401
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
552
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
164
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
164
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
165
165
  </footer>
166
166
 
167
167
  <script> prettyPrint(); </script>
@@ -22631,7 +22631,7 @@
22631
22631
  <br class="clear">
22632
22632
 
22633
22633
  <footer>
22634
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
22634
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
22635
22635
  </footer>
22636
22636
 
22637
22637
  <script> prettyPrint(); </script>
@@ -3825,7 +3825,7 @@
3825
3825
  <br class="clear">
3826
3826
 
3827
3827
  <footer>
3828
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
3828
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
3829
3829
  </footer>
3830
3830
 
3831
3831
  <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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
209
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
204
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
1869
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard 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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
381
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
382
382
  </footer>
383
383
 
384
384
  <script> prettyPrint(); </script>
package/doc/Path.html CHANGED
@@ -165,7 +165,7 @@
165
165
 
166
166
  <dt class="tag-source">Source:</dt>
167
167
  <dd class="tag-source"><ul class="dummy"><li>
168
- <a href="structure_graph.js.html">structure/graph.js</a>, <a href="structure_graph.js.html#line133">line 133</a>
168
+ <a href="structure_graph.js.html">structure/graph.js</a>, <a href="structure_graph.js.html#line135">line 135</a>
169
169
  </li></ul></dd>
170
170
 
171
171
 
@@ -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 Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time)
236
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Nov 17 2025 10:18:37 GMT-0800 (Pacific Standard Time)
237
237
  </footer>
238
238
 
239
239
  <script> prettyPrint(); </script>