gremlin 3.7.0 → 3.7.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 -4
- package/.nvmrc +1 -0
- package/LICENSE +9 -1
- package/NOTICE +1 -1
- package/README.md +1 -1
- package/doc/AnonymousTraversalSource.html +2 -2
- package/doc/Authenticator.html +2 -2
- package/doc/Bytecode.html +2 -2
- package/doc/CardinalityValue.html +6 -6
- package/doc/Client.html +12 -78
- package/doc/Connection.html +12 -166
- package/doc/DataType.js.html +149 -0
- package/doc/DriverRemoteConnection.html +15 -81
- package/doc/EdgeLabelVerificationStrategy.html +2 -2
- package/doc/Graph.html +2 -2
- package/doc/GraphBinaryReader.js.html +132 -0
- package/doc/GraphBinaryWriter.js.html +135 -0
- package/doc/GraphSON2Reader.html +4 -4
- package/doc/GraphSON2Writer.html +5 -5
- package/doc/GraphSON3Reader.html +3 -3
- package/doc/GraphSON3Writer.html +3 -3
- package/doc/GraphTraversal.html +4306 -298
- package/doc/GraphTraversalSource.html +2 -2
- 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 +7 -95
- package/doc/SaslAuthenticator.html +2 -2
- package/doc/SaslMechanismBase.html +2 -2
- package/doc/SaslMechanismPlain.html +7 -7
- package/doc/SeedStrategy.html +2 -2
- package/doc/SubgraphStrategy.html +2 -2
- package/doc/TextP.html +2 -2
- package/doc/Transaction.html +5 -5
- 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 +3 -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 +3 -5
- package/doc/driver_connection.js.html +91 -116
- package/doc/driver_driver-remote-connection.js.html +3 -5
- 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 -11
- package/doc/global.html +159 -4
- package/doc/index.html +3 -3
- package/doc/module.exports.html +4 -4
- package/doc/process_anonymous-traversal.js.html +2 -2
- package/doc/process_bytecode.js.html +2 -2
- package/doc/process_graph-traversal.js.html +259 -2
- package/doc/process_transaction.js.html +12 -4
- package/doc/process_translator.js.html +2 -2
- package/doc/process_traversal-strategy.js.html +2 -2
- package/doc/process_traversal.js.html +3 -2
- package/doc/structure_graph.js.html +2 -2
- package/doc/structure_io_binary_internals_DataType.js.html +3 -2
- package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +4 -2
- package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +4 -2
- package/doc/structure_io_graph-serializer.js.html +3 -2
- package/doc/structure_io_type-serializers.js.html +2 -2
- package/doc/utils.js.html +181 -0
- package/index.js +1 -0
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +1 -0
- package/lib/driver/client.js +1 -3
- package/lib/driver/connection.js +89 -114
- package/lib/driver/driver-remote-connection.js +1 -3
- package/lib/driver/result-set.js +0 -9
- package/lib/process/graph-traversal.js +257 -0
- package/lib/process/transaction.js +10 -2
- package/lib/process/traversal.js +1 -0
- package/lib/structure/io/binary/internals/AnySerializer.js +2 -0
- package/lib/structure/io/binary/internals/ArraySerializer.js +2 -0
- package/lib/structure/io/binary/internals/BigIntegerSerializer.js +2 -0
- package/lib/structure/io/binary/internals/BooleanSerializer.js +2 -0
- package/lib/structure/io/binary/internals/BulkSetSerializer.js +2 -0
- package/lib/structure/io/binary/internals/ByteBufferSerializer.js +2 -0
- package/lib/structure/io/binary/internals/ByteSerializer.js +2 -0
- package/lib/structure/io/binary/internals/BytecodeSerializer.js +1 -0
- package/lib/structure/io/binary/internals/DataType.js +1 -0
- package/lib/structure/io/binary/internals/DateSerializer.js +2 -0
- package/lib/structure/io/binary/internals/DoubleSerializer.js +2 -0
- package/lib/structure/io/binary/internals/EdgeSerializer.js +1 -0
- package/lib/structure/io/binary/internals/EnumSerializer.js +2 -0
- package/lib/structure/io/binary/internals/FloatSerializer.js +2 -0
- package/lib/structure/io/binary/internals/GraphBinaryReader.js +2 -0
- package/lib/structure/io/binary/internals/GraphBinaryWriter.js +2 -0
- package/lib/structure/io/binary/internals/IntSerializer.js +2 -0
- package/lib/structure/io/binary/internals/LambdaSerializer.js +1 -0
- package/lib/structure/io/binary/internals/LongSerializer.js +2 -0
- package/lib/structure/io/binary/internals/LongSerializerNg.js +2 -0
- package/lib/structure/io/binary/internals/MapSerializer.js +2 -0
- package/lib/structure/io/binary/internals/PSerializer.js +1 -0
- package/lib/structure/io/binary/internals/PathSerializer.js +1 -0
- package/lib/structure/io/binary/internals/PropertySerializer.js +1 -0
- package/lib/structure/io/binary/internals/ShortSerializer.js +2 -0
- package/lib/structure/io/binary/internals/StringSerializer.js +2 -0
- package/lib/structure/io/binary/internals/TextPSerializer.js +1 -0
- package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +2 -0
- package/lib/structure/io/binary/internals/TraverserSerializer.js +1 -0
- package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +2 -0
- package/lib/structure/io/binary/internals/UuidSerializer.js +2 -0
- package/lib/structure/io/binary/internals/VertexPropertySerializer.js +1 -0
- package/lib/structure/io/binary/internals/VertexSerializer.js +1 -0
- package/lib/structure/io/binary/internals/utils.js +2 -0
- package/lib/structure/io/graph-serializer.js +1 -0
- package/lib/utils.js +40 -29
- package/licenses/chai +21 -0
- package/package.json +8 -4
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
*/
|
|
51
51
|
'use strict';
|
|
52
52
|
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const util = require('util');
|
|
53
|
+
const { Buffer } = require('buffer');
|
|
54
|
+
const EventEmitter = require('eventemitter3');
|
|
55
|
+
const Stream = require('readable-stream');
|
|
57
56
|
const utils = require('../utils');
|
|
57
|
+
const { DeferredPromise } = utils;
|
|
58
58
|
const serializer = require('../structure/io/graph-serializer');
|
|
59
59
|
const { graphBinaryReader, graphBinaryWriter } = require('../structure/io/binary/GraphBinary');
|
|
60
60
|
const ResultSet = require('./result-set');
|
|
@@ -71,8 +71,7 @@ const defaultMimeType = 'application/vnd.gremlin-v3.0+json';
|
|
|
71
71
|
const graphSON2MimeType = 'application/vnd.gremlin-v2.0+json';
|
|
72
72
|
const graphBinaryMimeType = 'application/vnd.graphbinary-v1.0';
|
|
73
73
|
|
|
74
|
-
const
|
|
75
|
-
const pongTimeoutDelay = 30 * 1000;
|
|
74
|
+
const uuidPattern = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
77
|
* Represents a single connection to a Gremlin Server.
|
|
@@ -93,9 +92,7 @@ class Connection extends EventEmitter {
|
|
|
93
92
|
* @param {Authenticator} [options.authenticator] The authentication handler to use.
|
|
94
93
|
* @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
|
|
95
94
|
* @param {Boolean} [options.enableUserAgentOnConnect] Determines if a user agent will be sent during connection handshake. Defaults to: true
|
|
96
|
-
* @param {
|
|
97
|
-
* @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
|
|
98
|
-
* @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
|
|
95
|
+
* @param {http.Agent} [options.agent] The http.Agent implementation to use.
|
|
99
96
|
* @constructor
|
|
100
97
|
*/
|
|
101
98
|
constructor(url, options) {
|
|
@@ -112,14 +109,12 @@ class Connection extends EventEmitter {
|
|
|
112
109
|
|
|
113
110
|
// A map containing the request id and the handler. The id should be in lower case to prevent string comparison issues.
|
|
114
111
|
this._responseHandlers = {};
|
|
115
|
-
this._reader = options.reader || this
|
|
116
|
-
this._writer = options.writer || this
|
|
112
|
+
this._reader = options.reader || this.#getDefaultReader(this.mimeType);
|
|
113
|
+
this._writer = options.writer || this.#getDefaultWriter(this.mimeType);
|
|
117
114
|
this._openPromise = null;
|
|
118
115
|
this._openCallback = null;
|
|
119
116
|
this._closePromise = null;
|
|
120
117
|
this._closeCallback = null;
|
|
121
|
-
this._pingInterval = null;
|
|
122
|
-
this._pongTimeout = null;
|
|
123
118
|
|
|
124
119
|
this._header = String.fromCharCode(this.mimeType.length) + this.mimeType; // TODO: what if mimeType.length > 255
|
|
125
120
|
this._header_buf = Buffer.from(this._header);
|
|
@@ -127,75 +122,71 @@ class Connection extends EventEmitter {
|
|
|
127
122
|
this.traversalSource = options.traversalSource || 'g';
|
|
128
123
|
this._authenticator = options.authenticator;
|
|
129
124
|
this._enableUserAgentOnConnect = options.enableUserAgentOnConnect !== false;
|
|
130
|
-
|
|
131
|
-
this._pingEnabled = this.options.pingEnabled === false ? false : true;
|
|
132
|
-
this._pingIntervalDelay = this.options.pingInterval || pingIntervalDelay;
|
|
133
|
-
this._pongTimeoutDelay = this.options.pongTimeout || pongTimeoutDelay;
|
|
134
125
|
}
|
|
135
126
|
|
|
136
127
|
/**
|
|
137
128
|
* Opens the connection, if its not already opened.
|
|
138
129
|
* @returns {Promise}
|
|
139
130
|
*/
|
|
140
|
-
open() {
|
|
131
|
+
async open() {
|
|
141
132
|
if (this.isOpen) {
|
|
142
|
-
return
|
|
133
|
+
return;
|
|
143
134
|
}
|
|
144
135
|
if (this._openPromise) {
|
|
145
136
|
return this._openPromise;
|
|
146
137
|
}
|
|
147
138
|
|
|
139
|
+
this._openPromise = DeferredPromise();
|
|
140
|
+
|
|
148
141
|
this.emit('log', 'ws open');
|
|
149
142
|
let headers = this.options.headers;
|
|
150
143
|
if (this._enableUserAgentOnConnect) {
|
|
151
144
|
if (!headers) {
|
|
152
145
|
headers = [];
|
|
153
146
|
}
|
|
154
|
-
|
|
147
|
+
|
|
148
|
+
const userAgent = await utils.getUserAgent();
|
|
149
|
+
if (userAgent !== undefined) {
|
|
150
|
+
headers[utils.getUserAgentHeader()] = await utils.getUserAgent();
|
|
151
|
+
}
|
|
155
152
|
}
|
|
156
153
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
154
|
+
const WebSocket = globalThis.WebSocket ?? (await import('ws')).default;
|
|
155
|
+
|
|
156
|
+
this._ws = new WebSocket(
|
|
157
|
+
this.url,
|
|
158
|
+
globalThis.WebSocket === undefined
|
|
159
|
+
? {
|
|
160
|
+
headers: headers,
|
|
161
|
+
ca: this.options.ca,
|
|
162
|
+
cert: this.options.cert,
|
|
163
|
+
pfx: this.options.pfx,
|
|
164
|
+
rejectUnauthorized: this.options.rejectUnauthorized,
|
|
165
|
+
agent: this.options.agent,
|
|
166
|
+
}
|
|
167
|
+
: undefined,
|
|
168
|
+
);
|
|
164
169
|
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
if ('binaryType' in this._ws) {
|
|
171
|
+
this._ws.binaryType = 'arraybuffer';
|
|
172
|
+
}
|
|
167
173
|
|
|
168
|
-
this._ws.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
this._pongTimeout = null;
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
this._ws.on('ping', () => {
|
|
176
|
-
this.emit('log', 'ws ping received');
|
|
177
|
-
this._ws.pong();
|
|
178
|
-
});
|
|
174
|
+
this._ws.addEventListener('open', this.#handleOpen);
|
|
175
|
+
this._ws.addEventListener('error', this.#handleError);
|
|
176
|
+
this._ws.addEventListener('message', this.#handleMessage);
|
|
177
|
+
this._ws.addEventListener('close', this.#handleClose);
|
|
179
178
|
|
|
180
|
-
return
|
|
181
|
-
this._ws.on('open', () => {
|
|
182
|
-
this.isOpen = true;
|
|
183
|
-
if (this._pingEnabled) {
|
|
184
|
-
this._pingHeartbeat();
|
|
185
|
-
}
|
|
186
|
-
resolve();
|
|
187
|
-
});
|
|
188
|
-
this._ws.on('error', (err) => {
|
|
189
|
-
this._handleError(err);
|
|
190
|
-
reject(err);
|
|
191
|
-
});
|
|
192
|
-
}));
|
|
179
|
+
return await this._openPromise;
|
|
193
180
|
}
|
|
194
181
|
|
|
195
182
|
/** @override */
|
|
196
183
|
submit(processor, op, args, requestId) {
|
|
197
184
|
// TINKERPOP-2847: Use lower case to prevent string comparison issues.
|
|
198
185
|
const rid = (requestId || utils.getUuid()).toLowerCase();
|
|
186
|
+
if (!rid.match(uuidPattern)) {
|
|
187
|
+
throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
|
|
188
|
+
}
|
|
189
|
+
|
|
199
190
|
return this.open().then(
|
|
200
191
|
() =>
|
|
201
192
|
new Promise((resolve, reject) => {
|
|
@@ -215,7 +206,7 @@ class Connection extends EventEmitter {
|
|
|
215
206
|
};
|
|
216
207
|
|
|
217
208
|
const request_buf = this._writer.writeRequest(request);
|
|
218
|
-
const message = Buffer.concat([this._header_buf, request_buf]);
|
|
209
|
+
const message = utils.toArrayBuffer(Buffer.concat([this._header_buf, request_buf]));
|
|
219
210
|
this._ws.send(message);
|
|
220
211
|
}),
|
|
221
212
|
);
|
|
@@ -225,6 +216,9 @@ class Connection extends EventEmitter {
|
|
|
225
216
|
stream(processor, op, args, requestId) {
|
|
226
217
|
// TINKERPOP-2847: Use lower case to prevent string comparison issues.
|
|
227
218
|
const rid = (requestId || utils.getUuid()).toLowerCase();
|
|
219
|
+
if (!rid.match(uuidPattern)) {
|
|
220
|
+
throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
|
|
221
|
+
}
|
|
228
222
|
|
|
229
223
|
const readableStream = new Stream.Readable({
|
|
230
224
|
objectMode: true,
|
|
@@ -247,7 +241,7 @@ class Connection extends EventEmitter {
|
|
|
247
241
|
};
|
|
248
242
|
|
|
249
243
|
const request_buf = this._writer.writeRequest(request);
|
|
250
|
-
const message = Buffer.concat([this._header_buf, request_buf]);
|
|
244
|
+
const message = utils.toArrayBuffer(Buffer.concat([this._header_buf, request_buf]));
|
|
251
245
|
this._ws.send(message);
|
|
252
246
|
})
|
|
253
247
|
.catch((err) => readableStream.destroy(err));
|
|
@@ -255,7 +249,7 @@ class Connection extends EventEmitter {
|
|
|
255
249
|
return readableStream;
|
|
256
250
|
}
|
|
257
251
|
|
|
258
|
-
|
|
252
|
+
#getDefaultReader(mimeType) {
|
|
259
253
|
if (mimeType === graphBinaryMimeType) {
|
|
260
254
|
return graphBinaryReader;
|
|
261
255
|
}
|
|
@@ -263,7 +257,7 @@ class Connection extends EventEmitter {
|
|
|
263
257
|
return mimeType === graphSON2MimeType ? new serializer.GraphSON2Reader() : new serializer.GraphSONReader();
|
|
264
258
|
}
|
|
265
259
|
|
|
266
|
-
|
|
260
|
+
#getDefaultWriter(mimeType) {
|
|
267
261
|
if (mimeType === graphBinaryMimeType) {
|
|
268
262
|
return graphBinaryWriter;
|
|
269
263
|
}
|
|
@@ -271,68 +265,58 @@ class Connection extends EventEmitter {
|
|
|
271
265
|
return mimeType === graphSON2MimeType ? new serializer.GraphSON2Writer() : new serializer.GraphSONWriter();
|
|
272
266
|
}
|
|
273
267
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
268
|
+
#handleOpen = () => {
|
|
269
|
+
this._openPromise.resolve();
|
|
270
|
+
this.isOpen = true;
|
|
271
|
+
};
|
|
279
272
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
this._pongTimeout = setTimeout(() => {
|
|
290
|
-
this._ws.terminate();
|
|
291
|
-
}, this._pongTimeoutDelay);
|
|
292
|
-
|
|
293
|
-
this._ws.ping();
|
|
294
|
-
}, this._pingIntervalDelay);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
_handleError(err) {
|
|
298
|
-
this.emit('log', `ws error ${err}`);
|
|
299
|
-
this._cleanupWebsocket(err);
|
|
300
|
-
this.emit('socketError', err);
|
|
301
|
-
}
|
|
273
|
+
/**
|
|
274
|
+
* @param {Event} event
|
|
275
|
+
*/
|
|
276
|
+
#handleError = ({ error }) => {
|
|
277
|
+
this._openPromise.reject(error);
|
|
278
|
+
this.emit('log', `ws error ${error}`);
|
|
279
|
+
this.#cleanupWebsocket(error);
|
|
280
|
+
this.emit('socketError', error);
|
|
281
|
+
};
|
|
302
282
|
|
|
303
|
-
|
|
283
|
+
/**
|
|
284
|
+
* @param {CloseEvent} event
|
|
285
|
+
*/
|
|
286
|
+
#handleClose = ({ code, message }) => {
|
|
304
287
|
this.emit('log', `ws close code=${code} message=${message}`);
|
|
305
|
-
this
|
|
288
|
+
this.#cleanupWebsocket();
|
|
306
289
|
if (this._closeCallback) {
|
|
307
290
|
this._closeCallback();
|
|
308
291
|
}
|
|
309
292
|
this.emit('close', code, message);
|
|
310
|
-
}
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @param {MessageEvent<any>} event
|
|
297
|
+
*/
|
|
298
|
+
#handleMessage = ({ data: _data }) => {
|
|
299
|
+
const data = _data instanceof ArrayBuffer ? Buffer.from(_data) : _data;
|
|
311
300
|
|
|
312
|
-
_handleMessage(data) {
|
|
313
301
|
const response = this._reader.readResponse(data);
|
|
314
302
|
if (response.requestId === null || response.requestId === undefined) {
|
|
315
303
|
// There was a serialization issue on the server that prevented the parsing of the request id
|
|
316
304
|
// We invoke any of the pending handlers with an error
|
|
317
305
|
Object.keys(this._responseHandlers).forEach((requestId) => {
|
|
318
306
|
const handler = this._responseHandlers[requestId];
|
|
319
|
-
this
|
|
307
|
+
this.#clearHandler(requestId);
|
|
320
308
|
if (response.status !== undefined && response.status.message) {
|
|
321
309
|
return handler.callback(
|
|
322
310
|
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
323
311
|
new ResponseError(
|
|
324
|
-
|
|
325
|
-
'Server error (no request information): %s (%d)',
|
|
326
|
-
response.status.message,
|
|
327
|
-
response.status.code,
|
|
328
|
-
),
|
|
312
|
+
`Server error (no request information): ${response.status.message} (${response.status.code})`,
|
|
329
313
|
response.status,
|
|
330
314
|
),
|
|
331
315
|
);
|
|
332
316
|
}
|
|
333
317
|
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
334
318
|
return handler.callback(
|
|
335
|
-
new ResponseError(
|
|
319
|
+
new ResponseError(`Server error (no request information): ${JSON.stringify(response)}`, response.status),
|
|
336
320
|
);
|
|
337
321
|
});
|
|
338
322
|
return;
|
|
@@ -359,10 +343,7 @@ class Connection extends EventEmitter {
|
|
|
359
343
|
// callback in error
|
|
360
344
|
return handler.callback(
|
|
361
345
|
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
362
|
-
new ResponseError(
|
|
363
|
-
util.format('Server error: %s (%d)', response.status.message, response.status.code),
|
|
364
|
-
response.status,
|
|
365
|
-
),
|
|
346
|
+
new ResponseError(`Server error: ${response.status.message} (${response.status.code})`, response.status),
|
|
366
347
|
);
|
|
367
348
|
}
|
|
368
349
|
|
|
@@ -370,7 +351,7 @@ class Connection extends EventEmitter {
|
|
|
370
351
|
|
|
371
352
|
switch (response.status.code) {
|
|
372
353
|
case responseStatusCode.noContent:
|
|
373
|
-
this
|
|
354
|
+
this.#clearHandler(response.requestId);
|
|
374
355
|
if (isStreamingResponse) {
|
|
375
356
|
handler.result.push(new ResultSet(utils.emptyArray, response.status.attributes));
|
|
376
357
|
return handler.callback(null);
|
|
@@ -394,24 +375,15 @@ class Connection extends EventEmitter {
|
|
|
394
375
|
} else {
|
|
395
376
|
handler.result = response.result.data;
|
|
396
377
|
}
|
|
397
|
-
this
|
|
378
|
+
this.#clearHandler(response.requestId);
|
|
398
379
|
return handler.callback(null, new ResultSet(handler.result, response.status.attributes));
|
|
399
380
|
}
|
|
400
|
-
}
|
|
381
|
+
};
|
|
401
382
|
|
|
402
383
|
/**
|
|
403
384
|
* clean websocket context
|
|
404
385
|
*/
|
|
405
|
-
|
|
406
|
-
if (this._pingInterval) {
|
|
407
|
-
clearInterval(this._pingInterval);
|
|
408
|
-
}
|
|
409
|
-
this._pingInterval = null;
|
|
410
|
-
if (this._pongTimeout) {
|
|
411
|
-
clearTimeout(this._pongTimeout);
|
|
412
|
-
}
|
|
413
|
-
this._pongTimeout = null;
|
|
414
|
-
|
|
386
|
+
#cleanupWebsocket(err) {
|
|
415
387
|
// Invoke waiting callbacks to complete Promises when closing the websocket
|
|
416
388
|
Object.keys(this._responseHandlers).forEach((requestId) => {
|
|
417
389
|
const handler = this._responseHandlers[requestId];
|
|
@@ -423,7 +395,10 @@ class Connection extends EventEmitter {
|
|
|
423
395
|
handler.callback(cause);
|
|
424
396
|
}
|
|
425
397
|
});
|
|
426
|
-
this._ws.
|
|
398
|
+
this._ws.removeEventListener('open', this.#handleOpen);
|
|
399
|
+
this._ws.removeEventListener('error', this.#handleError);
|
|
400
|
+
this._ws.removeEventListener('message', this.#handleMessage);
|
|
401
|
+
this._ws.removeEventListener('close', this.#handleClose);
|
|
427
402
|
this._openPromise = null;
|
|
428
403
|
this._closePromise = null;
|
|
429
404
|
this.isOpen = false;
|
|
@@ -434,7 +409,7 @@ class Connection extends EventEmitter {
|
|
|
434
409
|
* @param requestId
|
|
435
410
|
* @private
|
|
436
411
|
*/
|
|
437
|
-
|
|
412
|
+
#clearHandler(requestId) {
|
|
438
413
|
delete this._responseHandlers[requestId];
|
|
439
414
|
}
|
|
440
415
|
|
|
@@ -467,13 +442,13 @@ module.exports = Connection;
|
|
|
467
442
|
</div>
|
|
468
443
|
|
|
469
444
|
<nav>
|
|
470
|
-
<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>
|
|
445
|
+
<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>
|
|
471
446
|
</nav>
|
|
472
447
|
|
|
473
448
|
<br class="clear">
|
|
474
449
|
|
|
475
450
|
<footer>
|
|
476
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
451
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 11:06:40 GMT-0700 (Pacific Daylight Time)
|
|
477
452
|
</footer>
|
|
478
453
|
|
|
479
454
|
<script> prettyPrint(); </script>
|
|
@@ -77,9 +77,7 @@ class DriverRemoteConnection extends RemoteConnection {
|
|
|
77
77
|
* @param {Authenticator} [options.authenticator] The authentication handler to use.
|
|
78
78
|
* @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
|
|
79
79
|
* @param {Boolean} [options.enableUserAgentOnConnect] Determines if a user agent will be sent during connection handshake. Defaults to: true
|
|
80
|
-
* @param {
|
|
81
|
-
* @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
|
|
82
|
-
* @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
|
|
80
|
+
* @param {http.Agent} [options.agent] The http.Agent implementation to use.
|
|
83
81
|
* @constructor
|
|
84
82
|
*/
|
|
85
83
|
constructor(url, options = {}) {
|
|
@@ -179,13 +177,13 @@ module.exports = DriverRemoteConnection;
|
|
|
179
177
|
</div>
|
|
180
178
|
|
|
181
179
|
<nav>
|
|
182
|
-
<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>
|
|
180
|
+
<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>
|
|
183
181
|
</nav>
|
|
184
182
|
|
|
185
183
|
<br class="clear">
|
|
186
184
|
|
|
187
185
|
<footer>
|
|
188
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
186
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 11:06:40 GMT-0700 (Pacific Daylight Time)
|
|
189
187
|
</footer>
|
|
190
188
|
|
|
191
189
|
<script> prettyPrint(); </script>
|
|
@@ -183,13 +183,13 @@ module.exports = { RemoteConnection, RemoteStrategy, RemoteTraversal };
|
|
|
183
183
|
</div>
|
|
184
184
|
|
|
185
185
|
<nav>
|
|
186
|
-
<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>
|
|
186
|
+
<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>
|
|
187
187
|
</nav>
|
|
188
188
|
|
|
189
189
|
<br class="clear">
|
|
190
190
|
|
|
191
191
|
<footer>
|
|
192
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
192
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 11:06:40 GMT-0700 (Pacific Daylight Time)
|
|
193
193
|
</footer>
|
|
194
194
|
|
|
195
195
|
<script> prettyPrint(); </script>
|
|
@@ -83,13 +83,13 @@ module.exports = ResponseError;
|
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
85
|
<nav>
|
|
86
|
-
<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>
|
|
86
|
+
<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>
|
|
87
87
|
</nav>
|
|
88
88
|
|
|
89
89
|
<br class="clear">
|
|
90
90
|
|
|
91
91
|
<footer>
|
|
92
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
92
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 11:06:40 GMT-0700 (Pacific Daylight Time)
|
|
93
93
|
</footer>
|
|
94
94
|
|
|
95
95
|
<script> prettyPrint(); </script>
|
|
@@ -50,8 +50,6 @@
|
|
|
50
50
|
*/
|
|
51
51
|
'use strict';
|
|
52
52
|
|
|
53
|
-
const util = require('util');
|
|
54
|
-
const inspect = util.inspect.custom || 'inspect';
|
|
55
53
|
const utils = require('../utils');
|
|
56
54
|
const emptyMap = Object.freeze(new utils.ImmutableMap());
|
|
57
55
|
|
|
@@ -92,13 +90,6 @@ class ResultSet {
|
|
|
92
90
|
return this._items[Symbol.iterator]();
|
|
93
91
|
}
|
|
94
92
|
|
|
95
|
-
/**
|
|
96
|
-
* Provides a representation useful for debug and tracing.
|
|
97
|
-
*/
|
|
98
|
-
[inspect]() {
|
|
99
|
-
return this._items;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
93
|
/**
|
|
103
94
|
* Gets an array of result items.
|
|
104
95
|
* @returns {Array}
|
|
@@ -128,13 +119,13 @@ module.exports = ResultSet;
|
|
|
128
119
|
</div>
|
|
129
120
|
|
|
130
121
|
<nav>
|
|
131
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="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>
|
|
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="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>
|
|
132
123
|
</nav>
|
|
133
124
|
|
|
134
125
|
<br class="clear">
|
|
135
126
|
|
|
136
127
|
<footer>
|
|
137
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
128
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 15 2024 11:06:40 GMT-0700 (Pacific Daylight Time)
|
|
138
129
|
</footer>
|
|
139
130
|
|
|
140
131
|
<script> prettyPrint(); </script>
|