gremlin 3.6.0 → 3.6.2
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/NOTICE +1 -1
- package/doc/AnonymousTraversalSource.html +2 -2
- package/doc/Authenticator.html +2 -2
- package/doc/Bytecode.html +2 -2
- package/doc/Client.html +174 -9
- package/doc/Connection.html +43 -10
- package/doc/DriverRemoteConnection.html +144 -12
- 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 +112 -112
- package/doc/GraphTraversalSource.html +19 -19
- 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 +2 -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 +7 -2
- package/doc/driver_connection.js.html +49 -13
- package/doc/driver_driver-remote-connection.js.html +6 -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 +68 -4
- package/doc/index.html +2 -2
- 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 +25 -13
- package/doc/process_transaction.js.html +2 -2
- package/doc/process_translator.js.html +2 -2
- package/doc/process_traversal-strategy.js.html +3 -3
- package/doc/process_traversal.js.html +4 -4
- 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/docker-compose.yml +62 -0
- package/index.js +1 -0
- package/lib/driver/client.js +5 -0
- package/lib/driver/connection.js +47 -11
- package/lib/driver/driver-remote-connection.js +4 -0
- package/lib/process/graph-traversal.js +23 -11
- package/lib/process/traversal-strategy.js +1 -1
- package/lib/process/traversal.js +2 -2
- 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/lib/utils.js +29 -0
- package/package.json +22 -12
|
@@ -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="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#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 Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard 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 Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard 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 Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard 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 Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard 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="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#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 Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard Time)
|
|
346
346
|
</footer>
|
|
347
347
|
|
|
348
348
|
<script> prettyPrint(); </script>
|
|
@@ -540,13 +540,13 @@ module.exports = {
|
|
|
540
540
|
</div>
|
|
541
541
|
|
|
542
542
|
<nav>
|
|
543
|
-
<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="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#statics">statics</a></li></ul>
|
|
543
|
+
<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>
|
|
544
544
|
</nav>
|
|
545
545
|
|
|
546
546
|
<br class="clear">
|
|
547
547
|
|
|
548
548
|
<footer>
|
|
549
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
549
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Jan 26 2023 15:50:35 GMT-0800 (Pacific Standard Time)
|
|
550
550
|
</footer>
|
|
551
551
|
|
|
552
552
|
<script> prettyPrint(); </script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
version: "3.8"
|
|
19
|
+
|
|
20
|
+
services:
|
|
21
|
+
|
|
22
|
+
gremlin-server-test-js:
|
|
23
|
+
container_name: gremlin-server-test-js
|
|
24
|
+
image: tinkerpop/gremlin-server-test:${GREMLIN_SERVER}
|
|
25
|
+
build:
|
|
26
|
+
context: ../../../../../
|
|
27
|
+
dockerfile: docker/gremlin-test-server/Dockerfile
|
|
28
|
+
args:
|
|
29
|
+
- GREMLIN_SERVER=${GREMLIN_SERVER}
|
|
30
|
+
ports:
|
|
31
|
+
- "45940:45940"
|
|
32
|
+
- "45941:45941"
|
|
33
|
+
- "45942:45942"
|
|
34
|
+
- "4588:4588"
|
|
35
|
+
volumes:
|
|
36
|
+
- ${HOME}/.groovy:/root/.groovy
|
|
37
|
+
- ${HOME}/.m2:/root/.m2
|
|
38
|
+
- ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test
|
|
39
|
+
healthcheck:
|
|
40
|
+
test: [ "CMD-SHELL", "apk add curl && curl -f http://localhost:45940?gremlin=100-1" ]
|
|
41
|
+
interval: 30s
|
|
42
|
+
timeout: 10s
|
|
43
|
+
retries: 30
|
|
44
|
+
start_period: 30s
|
|
45
|
+
|
|
46
|
+
gremlin-js-integration-tests:
|
|
47
|
+
container_name: gremlin-js-integration-tests
|
|
48
|
+
image: node:16
|
|
49
|
+
volumes:
|
|
50
|
+
- .:/js_app
|
|
51
|
+
- ../../../../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/gremlin-test
|
|
52
|
+
- ../../../../../docker/gremlin-test-server:/js_app/gremlin-test-server
|
|
53
|
+
environment:
|
|
54
|
+
- DOCKER_ENVIRONMENT=true
|
|
55
|
+
- TEST_TRANSACTIONS=true
|
|
56
|
+
working_dir: /js_app
|
|
57
|
+
command: >
|
|
58
|
+
bash -c "npm config set cache /tmp --global
|
|
59
|
+
&& npm ci && npm run test && npm run features-docker"
|
|
60
|
+
depends_on:
|
|
61
|
+
gremlin-server-test-js:
|
|
62
|
+
condition: service_healthy
|
package/index.js
CHANGED
package/lib/driver/client.js
CHANGED
|
@@ -39,8 +39,13 @@ class Client {
|
|
|
39
39
|
* @param {String} [options.traversalSource] The traversal source. Defaults to: 'g'.
|
|
40
40
|
* @param {GraphSONWriter} [options.writer] The writer to use.
|
|
41
41
|
* @param {Authenticator} [options.authenticator] The authentication handler to use.
|
|
42
|
+
* @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
|
|
43
|
+
* @param {Boolean} [options.enableUserAgentOnConnect] Determines if a user agent will be sent during connection handshake. Defaults to: true
|
|
42
44
|
* @param {String} [options.processor] The name of the opProcessor to use, leave it undefined or set 'session' when session mode.
|
|
43
45
|
* @param {String} [options.session] The sessionId of Client in session mode. Defaults to null means session-less Client.
|
|
46
|
+
* @param {Boolean} [options.pingEnabled] Setup ping interval. Defaults to: true.
|
|
47
|
+
* @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
|
|
48
|
+
* @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
|
|
44
49
|
* @constructor
|
|
45
50
|
*/
|
|
46
51
|
constructor(url, options = {}) {
|