gremlin 3.5.0 → 3.5.3
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 +154 -0
- package/.prettierrc.js +29 -0
- package/Gruntfile.js +15 -16
- package/NOTICE +1 -1
- package/doc/AnonymousTraversalSource.html +7 -7
- package/doc/Authenticator.html +3 -3
- package/doc/Bytecode.html +249 -5
- package/doc/Client.html +139 -65
- package/doc/Connection.html +90 -6
- package/doc/DriverRemoteConnection.html +380 -8
- package/doc/EdgeLabelVerificationStrategy.html +3 -3
- package/doc/Graph.html +2 -2
- package/doc/GraphSON2Reader.html +4 -4
- package/doc/GraphSON2Writer.html +3 -3
- package/doc/GraphSON3Reader.html +3 -3
- package/doc/GraphSON3Writer.html +3 -3
- package/doc/GraphTraversal.html +107 -107
- package/doc/GraphTraversalSource.html +130 -19
- package/doc/HaltedTraverserStrategy.html +3 -3
- package/doc/MatchAlgorithmStrategy.html +3 -3
- package/doc/P.html +13 -13
- package/doc/PartitionStrategy.html +3 -3
- package/doc/Path.html +2 -2
- package/doc/PlainTextSaslAuthenticator.html +2 -2
- package/doc/ProductiveByStrategy.html +288 -0
- package/doc/RemoteConnection.html +484 -10
- package/doc/RemoteStrategy.html +4 -4
- package/doc/RemoteTraversal.html +3 -3
- package/doc/ReservedKeysVerificationStrategy.html +3 -3
- package/doc/ResponseError.html +3 -3
- package/doc/ResultSet.html +8 -8
- package/doc/SaslAuthenticator.html +2 -2
- package/doc/SaslMechanismBase.html +3 -3
- package/doc/SaslMechanismPlain.html +6 -6
- package/doc/{GraphSONReader.html → SeedStrategy.html} +12 -15
- package/doc/SubgraphStrategy.html +3 -3
- package/doc/TextP.html +10 -10
- package/doc/Transaction.html +655 -0
- package/doc/Translator.html +200 -6
- package/doc/TraversalStrategies.html +137 -4
- package/doc/TraversalStrategy.html +4 -4
- package/doc/TypeSerializer.html +2 -2
- package/doc/driver_auth_authenticator.js.html +4 -4
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +3 -3
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +26 -17
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +7 -7
- package/doc/driver_auth_sasl-authenticator.js.html +3 -3
- package/doc/driver_client.js.html +75 -25
- package/doc/driver_connection.js.html +108 -89
- package/doc/driver_driver-remote-connection.js.html +40 -9
- package/doc/driver_remote-connection.js.html +47 -6
- package/doc/driver_response-error.js.html +5 -4
- package/doc/driver_result-set.js.html +4 -4
- package/doc/global.html +200 -3
- package/doc/index.html +2 -2
- package/doc/process_anonymous-traversal.js.html +5 -5
- package/doc/process_bytecode.js.html +32 -7
- package/doc/process_graph-traversal.js.html +213 -143
- package/doc/process_transaction.js.html +143 -0
- package/doc/process_translator.js.html +58 -39
- package/doc/process_traversal-strategy.js.html +79 -52
- package/doc/process_traversal.js.html +101 -108
- package/doc/structure_graph.js.html +7 -7
- package/doc/structure_io_graph-serializer.js.html +65 -18
- package/doc/structure_io_type-serializers.js.html +86 -89
- package/index.js +5 -5
- package/lib/driver/auth/authenticator.js +2 -2
- package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
- package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
- package/lib/driver/auth/sasl-authenticator.js +1 -1
- package/lib/driver/client.js +73 -23
- package/lib/driver/connection.js +106 -87
- package/lib/driver/driver-remote-connection.js +38 -7
- package/lib/driver/remote-connection.js +45 -4
- package/lib/driver/response-error.js +2 -2
- package/lib/driver/result-set.js +1 -2
- package/lib/process/anonymous-traversal.js +2 -3
- package/lib/process/bytecode.js +30 -5
- package/lib/process/graph-traversal.js +210 -141
- package/lib/process/transaction.js +92 -0
- package/lib/process/translator.js +55 -37
- package/lib/process/traversal-strategy.js +76 -50
- package/lib/process/traversal.js +99 -106
- package/lib/structure/graph.js +5 -5
- package/lib/structure/io/graph-serializer.js +62 -16
- package/lib/structure/io/type-serializers.js +84 -87
- package/lib/utils.js +15 -10
- package/package.json +11 -5
- package/doc/GraphSONWriter.html +0 -436
- package/gremlin-javascript.iml +0 -9
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
'use strict';
|
|
52
52
|
|
|
53
53
|
const EventEmitter = require('events');
|
|
54
|
+
const Stream = require('stream');
|
|
54
55
|
const WebSocket = require('ws');
|
|
55
56
|
const util = require('util');
|
|
56
57
|
const utils = require('../utils');
|
|
57
58
|
const serializer = require('../structure/io/graph-serializer');
|
|
58
59
|
const ResultSet = require('./result-set');
|
|
59
60
|
const ResponseError = require('./response-error');
|
|
60
|
-
const Bytecode = require('../process/bytecode');
|
|
61
61
|
|
|
62
62
|
const responseStatusCode = {
|
|
63
63
|
success: 200,
|
|
64
64
|
noContent: 204,
|
|
65
65
|
partialContent: 206,
|
|
66
|
-
authenticationChallenge:
|
|
66
|
+
authenticationChallenge: 407,
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const defaultMimeType = 'application/vnd.gremlin-v3.0+json';
|
|
@@ -76,7 +76,6 @@ const pongTimeoutDelay = 30 * 1000;
|
|
|
76
76
|
* Represents a single connection to a Gremlin Server.
|
|
77
77
|
*/
|
|
78
78
|
class Connection extends EventEmitter {
|
|
79
|
-
|
|
80
79
|
/**
|
|
81
80
|
* Creates a new instance of {@link Connection}.
|
|
82
81
|
* @param {String} url The resource uri.
|
|
@@ -120,7 +119,8 @@ class Connection extends EventEmitter {
|
|
|
120
119
|
this._pingInterval = null;
|
|
121
120
|
this._pongTimeout = null;
|
|
122
121
|
|
|
123
|
-
this._header = String.fromCharCode(this.mimeType.length) + this.mimeType;
|
|
122
|
+
this._header = String.fromCharCode(this.mimeType.length) + this.mimeType; // TODO: what if mimeType.length > 255
|
|
123
|
+
this._header_buf = Buffer.from(this._header);
|
|
124
124
|
this.isOpen = false;
|
|
125
125
|
this.traversalSource = options.traversalSource || 'g';
|
|
126
126
|
this._authenticator = options.authenticator;
|
|
@@ -146,14 +146,14 @@ class Connection extends EventEmitter {
|
|
|
146
146
|
return this._openPromise;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
this.emit('log',
|
|
149
|
+
this.emit('log', 'ws open');
|
|
150
150
|
|
|
151
151
|
this._ws = new WebSocket(this.url, {
|
|
152
152
|
headers: this.options.headers,
|
|
153
153
|
ca: this.options.ca,
|
|
154
154
|
cert: this.options.cert,
|
|
155
155
|
pfx: this.options.pfx,
|
|
156
|
-
rejectUnauthorized: this.options.rejectUnauthorized
|
|
156
|
+
rejectUnauthorized: this.options.rejectUnauthorized,
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
this._ws.on('message', (data) => this._handleMessage(data));
|
|
@@ -171,7 +171,7 @@ class Connection extends EventEmitter {
|
|
|
171
171
|
this._ws.pong();
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
return this._openPromise = new Promise((resolve, reject) => {
|
|
174
|
+
return (this._openPromise = new Promise((resolve, reject) => {
|
|
175
175
|
this._ws.on('open', () => {
|
|
176
176
|
this.isOpen = true;
|
|
177
177
|
if (this._pingEnabled) {
|
|
@@ -183,59 +183,79 @@ class Connection extends EventEmitter {
|
|
|
183
183
|
this._handleError(err);
|
|
184
184
|
reject(err);
|
|
185
185
|
});
|
|
186
|
-
});
|
|
186
|
+
}));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/** @override */
|
|
190
190
|
submit(processor, op, args, requestId) {
|
|
191
191
|
const rid = requestId || utils.getUuid();
|
|
192
|
-
return this.open().then(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
return this.open().then(
|
|
193
|
+
() =>
|
|
194
|
+
new Promise((resolve, reject) => {
|
|
195
|
+
if (op !== 'authentication') {
|
|
196
|
+
this._responseHandlers[rid] = {
|
|
197
|
+
callback: (err, result) => (err ? reject(err) : resolve(result)),
|
|
198
|
+
result: null,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const request = {
|
|
203
|
+
requestId: rid,
|
|
204
|
+
op: op || 'bytecode',
|
|
205
|
+
// if using op eval need to ensure processor stays unset if caller didn't set it.
|
|
206
|
+
processor: !processor && op !== 'eval' ? 'traversal' : processor,
|
|
207
|
+
args: args || {},
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const request_buf = this._writer.writeRequest(request);
|
|
211
|
+
const message = Buffer.concat([this._header_buf, request_buf], this._header_buf.length + request_buf.length);
|
|
212
|
+
this._ws.send(message);
|
|
213
|
+
}),
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** @override */
|
|
218
|
+
stream(processor, op, args, requestId) {
|
|
219
|
+
const rid = requestId || utils.getUuid();
|
|
220
|
+
|
|
221
|
+
const readableStream = new Stream.Readable({
|
|
222
|
+
objectMode: true,
|
|
223
|
+
read() {},
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
this._responseHandlers[rid] = {
|
|
227
|
+
callback: (err) => (err ? readableStream.destroy(err) : readableStream.push(null)),
|
|
228
|
+
result: readableStream,
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
this.open()
|
|
232
|
+
.then(() => {
|
|
233
|
+
const request = {
|
|
234
|
+
requestId: rid,
|
|
235
|
+
op: op || 'bytecode',
|
|
236
|
+
// if using op eval need to ensure processor stays unset if caller didn't set it.
|
|
237
|
+
processor: !processor && op !== 'eval' ? 'traversal' : processor,
|
|
238
|
+
args: args || {},
|
|
197
239
|
};
|
|
198
|
-
}
|
|
199
240
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
241
|
+
const request_buf = this._writer.writeRequest(request);
|
|
242
|
+
const message = Buffer.concat([this._header_buf, request_buf], this._header_buf.length + request_buf.length);
|
|
243
|
+
this._ws.send(message);
|
|
244
|
+
})
|
|
245
|
+
.catch((err) => readableStream.destroy(err));
|
|
246
|
+
|
|
247
|
+
return readableStream;
|
|
203
248
|
}
|
|
204
249
|
|
|
205
250
|
_getDefaultReader(mimeType) {
|
|
206
|
-
return mimeType === graphSON2MimeType
|
|
207
|
-
? new serializer.GraphSON2Reader()
|
|
208
|
-
: new serializer.GraphSONReader();
|
|
251
|
+
return mimeType === graphSON2MimeType ? new serializer.GraphSON2Reader() : new serializer.GraphSONReader();
|
|
209
252
|
}
|
|
210
253
|
|
|
211
254
|
_getDefaultWriter(mimeType) {
|
|
212
|
-
return mimeType === graphSON2MimeType
|
|
213
|
-
? new serializer.GraphSON2Writer()
|
|
214
|
-
: new serializer.GraphSONWriter();
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
_getRequest(id, op, args, processor) {
|
|
218
|
-
if (args) {
|
|
219
|
-
args = this._adaptArgs(args, true);
|
|
220
|
-
} else {
|
|
221
|
-
args = {};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (args['gremlin'] instanceof Bytecode) {
|
|
225
|
-
args['gremlin'] = this._writer.adaptObject(args['gremlin']);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
return ({
|
|
229
|
-
'requestId': { '@type': 'g:UUID', '@value': id },
|
|
230
|
-
'op': op || 'bytecode',
|
|
231
|
-
// if using op eval need to ensure processor stays unset if caller didn't set it.
|
|
232
|
-
'processor': (!processor && op !== 'eval') ? 'traversal' : processor,
|
|
233
|
-
'args': args
|
|
234
|
-
});
|
|
255
|
+
return mimeType === graphSON2MimeType ? new serializer.GraphSON2Writer() : new serializer.GraphSONWriter();
|
|
235
256
|
}
|
|
236
257
|
|
|
237
258
|
_pingHeartbeat() {
|
|
238
|
-
|
|
239
259
|
if (this._pingInterval) {
|
|
240
260
|
clearInterval(this._pingInterval);
|
|
241
261
|
this._pingInterval = null;
|
|
@@ -255,7 +275,6 @@ class Connection extends EventEmitter {
|
|
|
255
275
|
}, this._pongTimeoutDelay);
|
|
256
276
|
|
|
257
277
|
this._ws.ping();
|
|
258
|
-
|
|
259
278
|
}, this._pingIntervalDelay);
|
|
260
279
|
}
|
|
261
280
|
|
|
@@ -275,22 +294,30 @@ class Connection extends EventEmitter {
|
|
|
275
294
|
}
|
|
276
295
|
|
|
277
296
|
_handleMessage(data) {
|
|
278
|
-
const response = this._reader.
|
|
297
|
+
const response = this._reader.readResponse(data);
|
|
279
298
|
if (response.requestId === null || response.requestId === undefined) {
|
|
280
299
|
// There was a serialization issue on the server that prevented the parsing of the request id
|
|
281
300
|
// We invoke any of the pending handlers with an error
|
|
282
|
-
Object.keys(this._responseHandlers).forEach(requestId => {
|
|
301
|
+
Object.keys(this._responseHandlers).forEach((requestId) => {
|
|
283
302
|
const handler = this._responseHandlers[requestId];
|
|
284
303
|
this._clearHandler(requestId);
|
|
285
304
|
if (response.status !== undefined && response.status.message) {
|
|
286
305
|
return handler.callback(
|
|
287
306
|
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
288
|
-
new ResponseError(
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
307
|
+
new ResponseError(
|
|
308
|
+
util.format(
|
|
309
|
+
'Server error (no request information): %s (%d)',
|
|
310
|
+
response.status.message,
|
|
311
|
+
response.status.code,
|
|
312
|
+
),
|
|
313
|
+
response.status,
|
|
314
|
+
),
|
|
315
|
+
);
|
|
293
316
|
}
|
|
317
|
+
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
318
|
+
return handler.callback(
|
|
319
|
+
new ResponseError(util.format('Server error (no request information): %j', response), response.status),
|
|
320
|
+
);
|
|
294
321
|
});
|
|
295
322
|
return;
|
|
296
323
|
}
|
|
@@ -304,31 +331,49 @@ class Connection extends EventEmitter {
|
|
|
304
331
|
}
|
|
305
332
|
|
|
306
333
|
if (response.status.code === responseStatusCode.authenticationChallenge && this._authenticator) {
|
|
307
|
-
this._authenticator
|
|
308
|
-
|
|
309
|
-
|
|
334
|
+
this._authenticator
|
|
335
|
+
.evaluateChallenge(response.result.data)
|
|
336
|
+
.then((res) => this.submit(undefined, 'authentication', res, response.requestId))
|
|
337
|
+
.catch(handler.callback);
|
|
310
338
|
|
|
311
339
|
return;
|
|
312
|
-
}
|
|
313
|
-
else if (response.status.code >= 400) {
|
|
340
|
+
} else if (response.status.code >= 400) {
|
|
314
341
|
// callback in error
|
|
315
342
|
return handler.callback(
|
|
316
343
|
// TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
|
|
317
|
-
new ResponseError(
|
|
344
|
+
new ResponseError(
|
|
345
|
+
util.format('Server error: %s (%d)', response.status.message, response.status.code),
|
|
346
|
+
response.status,
|
|
347
|
+
),
|
|
348
|
+
);
|
|
318
349
|
}
|
|
350
|
+
|
|
351
|
+
const isStreamingResponse = handler.result instanceof Stream.Readable;
|
|
352
|
+
|
|
319
353
|
switch (response.status.code) {
|
|
320
354
|
case responseStatusCode.noContent:
|
|
321
355
|
this._clearHandler(response.requestId);
|
|
356
|
+
if (isStreamingResponse) {
|
|
357
|
+
handler.result.push(new ResultSet(utils.emptyArray, response.status.attributes));
|
|
358
|
+
return handler.callback(null);
|
|
359
|
+
}
|
|
322
360
|
return handler.callback(null, new ResultSet(utils.emptyArray, response.status.attributes));
|
|
323
361
|
case responseStatusCode.partialContent:
|
|
362
|
+
if (isStreamingResponse) {
|
|
363
|
+
handler.result.push(new ResultSet(response.result.data, response.status.attributes));
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
324
366
|
handler.result = handler.result || [];
|
|
325
367
|
handler.result.push.apply(handler.result, response.result.data);
|
|
326
368
|
break;
|
|
327
369
|
default:
|
|
370
|
+
if (isStreamingResponse) {
|
|
371
|
+
handler.result.push(new ResultSet(response.result.data, response.status.attributes));
|
|
372
|
+
return handler.callback(null);
|
|
373
|
+
}
|
|
328
374
|
if (handler.result) {
|
|
329
375
|
handler.result.push.apply(handler.result, response.result.data);
|
|
330
|
-
}
|
|
331
|
-
else {
|
|
376
|
+
} else {
|
|
332
377
|
handler.result = response.result.data;
|
|
333
378
|
}
|
|
334
379
|
this._clearHandler(response.requestId);
|
|
@@ -364,32 +409,6 @@ class Connection extends EventEmitter {
|
|
|
364
409
|
delete this._responseHandlers[requestId];
|
|
365
410
|
}
|
|
366
411
|
|
|
367
|
-
/**
|
|
368
|
-
* Takes the given args map and ensures all arguments are passed through to _write.adaptObject
|
|
369
|
-
* @param {Object} args Map of arguments to process.
|
|
370
|
-
* @param {Boolean} protocolLevel Determines whether it's a protocol level binding.
|
|
371
|
-
* @returns {Object}
|
|
372
|
-
* @private
|
|
373
|
-
*/
|
|
374
|
-
_adaptArgs(args, protocolLevel) {
|
|
375
|
-
if (args instanceof Object) {
|
|
376
|
-
let newObj = {};
|
|
377
|
-
Object.keys(args).forEach((key) => {
|
|
378
|
-
// bindings key (at the protocol-level needs special handling. without this, it wraps the generated Map
|
|
379
|
-
// in another map for types like EnumValue. Could be a nicer way to do this but for now it's solving the
|
|
380
|
-
// problem with script submission of non JSON native types
|
|
381
|
-
if (protocolLevel && key === 'bindings')
|
|
382
|
-
newObj[key] = this._adaptArgs(args[key], false);
|
|
383
|
-
else
|
|
384
|
-
newObj[key] = this._writer.adaptObject(args[key]);
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
return newObj;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
return args;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
412
|
/**
|
|
394
413
|
* Closes the Connection.
|
|
395
414
|
* @return {Promise}
|
|
@@ -399,7 +418,7 @@ class Connection extends EventEmitter {
|
|
|
399
418
|
return Promise.resolve();
|
|
400
419
|
}
|
|
401
420
|
if (!this._closePromise) {
|
|
402
|
-
this._closePromise = new Promise(resolve => {
|
|
421
|
+
this._closePromise = new Promise((resolve) => {
|
|
403
422
|
this._closeCallback = resolve;
|
|
404
423
|
this._ws.close();
|
|
405
424
|
});
|
|
@@ -419,13 +438,13 @@ module.exports = Connection;
|
|
|
419
438
|
</div>
|
|
420
439
|
|
|
421
440
|
<nav>
|
|
422
|
-
<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="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="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>
|
|
441
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
|
|
423
442
|
</nav>
|
|
424
443
|
|
|
425
444
|
<br class="clear">
|
|
426
445
|
|
|
427
446
|
<footer>
|
|
428
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
447
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
429
448
|
</footer>
|
|
430
449
|
|
|
431
450
|
<script> prettyPrint(); </script>
|
|
@@ -53,14 +53,15 @@
|
|
|
53
53
|
const rcModule = require('./remote-connection');
|
|
54
54
|
const RemoteConnection = rcModule.RemoteConnection;
|
|
55
55
|
const RemoteTraversal = rcModule.RemoteTraversal;
|
|
56
|
+
const utils = require('../utils');
|
|
56
57
|
const Client = require('./client');
|
|
58
|
+
const Bytecode = require('../process/bytecode');
|
|
57
59
|
const OptionsStrategy = require('../process/traversal-strategy').OptionsStrategy;
|
|
58
60
|
|
|
59
61
|
/**
|
|
60
62
|
* Represents the default {@link RemoteConnection} implementation.
|
|
61
63
|
*/
|
|
62
64
|
class DriverRemoteConnection extends RemoteConnection {
|
|
63
|
-
|
|
64
65
|
/**
|
|
65
66
|
* Creates a new instance of {@link DriverRemoteConnection}.
|
|
66
67
|
* @param {String} url The resource uri.
|
|
@@ -77,8 +78,8 @@ class DriverRemoteConnection extends RemoteConnection {
|
|
|
77
78
|
* @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
|
|
78
79
|
* @constructor
|
|
79
80
|
*/
|
|
80
|
-
constructor(url, options) {
|
|
81
|
-
super(url);
|
|
81
|
+
constructor(url, options = {}) {
|
|
82
|
+
super(url, options);
|
|
82
83
|
this._client = new Client(url, options);
|
|
83
84
|
}
|
|
84
85
|
|
|
@@ -87,27 +88,57 @@ class DriverRemoteConnection extends RemoteConnection {
|
|
|
87
88
|
return this._client.open();
|
|
88
89
|
}
|
|
89
90
|
|
|
91
|
+
/** @override */
|
|
90
92
|
get isOpen() {
|
|
91
93
|
return this._client.isOpen;
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
/** @override */
|
|
95
97
|
submit(bytecode) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
const optionsStrategy = bytecode.sourceInstructions.find(
|
|
99
|
+
(i) => i[0] === 'withStrategies' && i[1] instanceof OptionsStrategy,
|
|
100
|
+
);
|
|
98
101
|
const allowedKeys = ['evaluationTimeout', 'scriptEvaluationTimeout', 'batchSize', 'requestId', 'userAgent'];
|
|
99
102
|
|
|
100
103
|
let requestOptions = undefined;
|
|
101
104
|
if (optionsStrategy !== undefined) {
|
|
102
105
|
requestOptions = {};
|
|
103
106
|
const conf = optionsStrategy[1].configuration;
|
|
104
|
-
for (
|
|
107
|
+
for (const key in conf) {
|
|
105
108
|
if (conf.hasOwnProperty(key) && allowedKeys.indexOf(key) > -1) {
|
|
106
109
|
requestOptions[key] = conf[key];
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
|
-
|
|
113
|
+
|
|
114
|
+
return this._client.submit(bytecode, null, requestOptions).then((result) => new RemoteTraversal(result.toArray()));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @override */
|
|
118
|
+
createSession() {
|
|
119
|
+
if (this.isSessionBound) {
|
|
120
|
+
throw new Error('Connection is already bound to a session - child sessions are not allowed');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// make sure a fresh session is used when starting a new transaction
|
|
124
|
+
const copiedOptions = Object.assign({}, this.options);
|
|
125
|
+
copiedOptions.session = utils.getUuid();
|
|
126
|
+
return new DriverRemoteConnection(this.url, copiedOptions);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** @override */
|
|
130
|
+
get isSessionBound() {
|
|
131
|
+
return this.options.session;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @override */
|
|
135
|
+
commit() {
|
|
136
|
+
return this._client.submit(Bytecode.GraphOp.commit, null);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** @override */
|
|
140
|
+
rollback() {
|
|
141
|
+
return this._client.submit(Bytecode.GraphOp.rollback, null);
|
|
111
142
|
}
|
|
112
143
|
|
|
113
144
|
/** @override */
|
|
@@ -137,13 +168,13 @@ module.exports = DriverRemoteConnection;
|
|
|
137
168
|
</div>
|
|
138
169
|
|
|
139
170
|
<nav>
|
|
140
|
-
<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="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="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>
|
|
171
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
|
|
141
172
|
</nav>
|
|
142
173
|
|
|
143
174
|
<br class="clear">
|
|
144
175
|
|
|
145
176
|
<footer>
|
|
146
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
177
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
147
178
|
</footer>
|
|
148
179
|
|
|
149
180
|
<script> prettyPrint(); </script>
|
|
@@ -58,8 +58,13 @@ const TraversalStrategy = require('../process/traversal-strategy').TraversalStra
|
|
|
58
58
|
* returning results.
|
|
59
59
|
*/
|
|
60
60
|
class RemoteConnection {
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* @param {String} url The resource uri.
|
|
63
|
+
* @param {Object} [options] The connection options.
|
|
64
|
+
*/
|
|
65
|
+
constructor(url, options = {}) {
|
|
62
66
|
this.url = url;
|
|
67
|
+
this.options = options;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
/**
|
|
@@ -78,6 +83,15 @@ class RemoteConnection {
|
|
|
78
83
|
throw new Error('isOpen() must be implemented');
|
|
79
84
|
}
|
|
80
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Determines if the connection is already bound to a session. If so, this indicates that the
|
|
88
|
+
* <code>#createSession()</code> cannot be called so as to produce child sessions.
|
|
89
|
+
* @returns {boolean}
|
|
90
|
+
*/
|
|
91
|
+
get isSessionBound() {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
|
|
81
95
|
/**
|
|
82
96
|
* Submits the <code>Bytecode</code> provided and returns a <code>RemoteTraversal</code>.
|
|
83
97
|
* @abstract
|
|
@@ -86,10 +100,34 @@ class RemoteConnection {
|
|
|
86
100
|
*/
|
|
87
101
|
submit(bytecode) {
|
|
88
102
|
throw new Error('submit() must be implemented');
|
|
89
|
-
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Create a new <code>RemoteConnection</code> that is bound to a session using the configuration from this one.
|
|
107
|
+
* If the connection is already session bound then this function should throw an exception.
|
|
108
|
+
* @returns {RemoteConnection}
|
|
109
|
+
*/
|
|
110
|
+
createSession() {
|
|
111
|
+
throw new Error('createSession() must be implemented');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Submits a <code>Bytecode.GraphOp.commit</code> to the server and closes the connection.
|
|
116
|
+
* @returns {Promise}
|
|
117
|
+
*/
|
|
118
|
+
commit() {
|
|
119
|
+
throw new Error('commit() must be implemented');
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Submits a <code>Bytecode.GraphOp.rollback</code> to the server and closes the connection.
|
|
123
|
+
* @returns {Promise}
|
|
124
|
+
*/
|
|
125
|
+
rollback() {
|
|
126
|
+
throw new Error('rollback() must be implemented');
|
|
127
|
+
}
|
|
90
128
|
|
|
91
129
|
/**
|
|
92
|
-
* Closes the connection
|
|
130
|
+
* Closes the connection where open transactions will close according to the features of the graph provider.
|
|
93
131
|
* @returns {Promise}
|
|
94
132
|
*/
|
|
95
133
|
close() {
|
|
@@ -114,7 +152,10 @@ class RemoteStrategy extends TraversalStrategy {
|
|
|
114
152
|
* @param {RemoteConnection} connection
|
|
115
153
|
*/
|
|
116
154
|
constructor(connection) {
|
|
117
|
-
|
|
155
|
+
// gave this a fqcn that has a local "js:" prefix since this strategy isn't sent as bytecode to the server.
|
|
156
|
+
// this is a sort of local-only strategy that actually executes client side. not sure if this prefix is the
|
|
157
|
+
// right way to name this or not, but it should have a name to identify it.
|
|
158
|
+
super('js:RemoteStrategy');
|
|
118
159
|
this.connection = connection;
|
|
119
160
|
}
|
|
120
161
|
|
|
@@ -142,13 +183,13 @@ module.exports = { RemoteConnection, RemoteStrategy, RemoteTraversal };
|
|
|
142
183
|
</div>
|
|
143
184
|
|
|
144
185
|
<nav>
|
|
145
|
-
<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="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="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>
|
|
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="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
|
|
146
187
|
</nav>
|
|
147
188
|
|
|
148
189
|
<br class="clear">
|
|
149
190
|
|
|
150
191
|
<footer>
|
|
151
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
192
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
152
193
|
</footer>
|
|
153
194
|
|
|
154
195
|
<script> prettyPrint(); </script>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
class ResponseError extends Error {
|
|
54
54
|
constructor(message, responseStatus) {
|
|
55
55
|
super(message);
|
|
56
|
-
this.name =
|
|
56
|
+
this.name = 'ResponseError';
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Gets the server status code.
|
|
@@ -72,7 +72,8 @@ class ResponseError extends Error {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
module.exports = ResponseError
|
|
75
|
+
module.exports = ResponseError;
|
|
76
|
+
</code></pre>
|
|
76
77
|
</article>
|
|
77
78
|
</section>
|
|
78
79
|
|
|
@@ -82,13 +83,13 @@ module.exports = ResponseError;</code></pre>
|
|
|
82
83
|
</div>
|
|
83
84
|
|
|
84
85
|
<nav>
|
|
85
|
-
<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="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="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>
|
|
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="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#statics">statics</a></li></ul>
|
|
86
87
|
</nav>
|
|
87
88
|
|
|
88
89
|
<br class="clear">
|
|
89
90
|
|
|
90
91
|
<footer>
|
|
91
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
92
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
92
93
|
</footer>
|
|
93
94
|
|
|
94
95
|
<script> prettyPrint(); </script>
|