You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2022/04/04 12:44:35 UTC
svn commit: r1899554 [17/17] - in /tinkerpop/site: docs/3.5.3-SNAPSHOT/dev/developer/ docs/3.5.3-SNAPSHOT/dev/provider/ docs/3.5.3-SNAPSHOT/recipes/ docs/3.5.3-SNAPSHOT/reference/ docs/3.5.3-SNAPSHOT/tutorials/getting-started/ docs/3.5.3-SNAPSHOT/tutor...
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_graph-traversal.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_graph-traversal.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_graph-traversal.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_graph-traversal.js.html Mon Apr 4 12:44:34 2022
@@ -60,7 +60,6 @@ const { TraversalStrategies, VertexProgr
* Represents the primary DSL of the Gremlin traversal machine.
*/
class GraphTraversalSource {
-
/**
* Creates a new instance of {@link GraphTraversalSource}.
* @param {Graph} graph
@@ -79,7 +78,7 @@ class GraphTraversalSource {
// in order to keep the constructor unchanged within 3.5.x we can try to pop the RemoteConnection out of the
// TraversalStrategies. keeping this unchanged will allow user DSLs to not take a break.
// TODO: refactor this to be nicer in 3.6.0 when we can take a breaking change
- const strat = traversalStrategies.strategies.find(ts => ts.fqcn === "js:RemoteStrategy");
+ const strat = traversalStrategies.strategies.find((ts) => ts.fqcn === 'js:RemoteStrategy');
this.remoteConnection = strat !== undefined ? strat.connection : undefined;
}
@@ -90,8 +89,13 @@ class GraphTraversalSource {
withRemote(remoteConnection) {
const traversalStrategy = new TraversalStrategies(this.traversalStrategies);
traversalStrategy.addStrategy(new remote.RemoteStrategy(remoteConnection));
- return new this.graphTraversalSourceClass(this.graph, traversalStrategy, new Bytecode(this.bytecode),
- this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ traversalStrategy,
+ new Bytecode(this.bytecode),
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
/**
@@ -101,7 +105,7 @@ class GraphTraversalSource {
tx() {
// you can't do g.tx().begin().tx() - no child transactions
if (this.remoteConnection && this.remoteConnection.isSessionBound) {
- throw new Error("This TraversalSource is already bound to a transaction - child transactions are not supported")
+ throw new Error('This TraversalSource is already bound to a transaction - child transactions are not supported');
}
return new Transaction(this);
@@ -118,9 +122,17 @@ class GraphTraversalSource {
* @returns {GraphTraversalSource}
*/
withComputer(graphComputer, workers, result, persist, vertices, edges, configuration) {
- return this.withStrategies(new VertexProgramStrategy({graphComputer: graphComputer,
- workers: workers, result: result, persist: persist, vertices: vertices, edges: edges,
- configuration: configuration}));
+ return this.withStrategies(
+ new VertexProgramStrategy({
+ graphComputer: graphComputer,
+ workers: workers,
+ result: result,
+ persist: persist,
+ vertices: vertices,
+ edges: edges,
+ configuration: configuration,
+ }),
+ );
}
/**
@@ -129,18 +141,23 @@ class GraphTraversalSource {
* @param {Object} value if not specified, the value with default to {@code true}
* @returns {GraphTraversalSource}
*/
- with_(key, value=undefined) {
+ with_(key, value = undefined) {
const val = value === undefined ? true : value;
let optionsStrategy = this.bytecode.sourceInstructions.find(
- i => i[0] === "withStrategies" && i[1] instanceof OptionsStrategy);
+ (i) => i[0] === 'withStrategies' && i[1] instanceof OptionsStrategy,
+ );
if (optionsStrategy === undefined) {
- optionsStrategy = new OptionsStrategy({[key]: val});
+ optionsStrategy = new OptionsStrategy({ [key]: val });
return this.withStrategies(optionsStrategy);
- } else {
- optionsStrategy[1].configuration[key] = val;
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies),
- this.bytecode, this.graphTraversalSourceClass, this.graphTraversalClass);
}
+ optionsStrategy[1].configuration[key] = val;
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ this.bytecode,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
/**
@@ -150,7 +167,7 @@ class GraphTraversalSource {
toString() {
return 'graphtraversalsource[' + this.graph.toString() + ']';
}
-
+
/**
* Graph Traversal Source withBulk method.
* @param {...Object} args
@@ -158,9 +175,15 @@ class GraphTraversalSource {
*/
withBulk(...args) {
const b = new Bytecode(this.bytecode).addSource('withBulk', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* Graph Traversal Source withPath method.
* @param {...Object} args
@@ -168,9 +191,15 @@ class GraphTraversalSource {
*/
withPath(...args) {
const b = new Bytecode(this.bytecode).addSource('withPath', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* Graph Traversal Source withSack method.
* @param {...Object} args
@@ -178,9 +207,15 @@ class GraphTraversalSource {
*/
withSack(...args) {
const b = new Bytecode(this.bytecode).addSource('withSack', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* Graph Traversal Source withSideEffect method.
* @param {...Object} args
@@ -188,9 +223,15 @@ class GraphTraversalSource {
*/
withSideEffect(...args) {
const b = new Bytecode(this.bytecode).addSource('withSideEffect', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* Graph Traversal Source withStrategies method.
* @param {...Object} args
@@ -198,9 +239,15 @@ class GraphTraversalSource {
*/
withStrategies(...args) {
const b = new Bytecode(this.bytecode).addSource('withStrategies', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* Graph Traversal Source withoutStrategies method.
* @param {...Object} args
@@ -208,9 +255,15 @@ class GraphTraversalSource {
*/
withoutStrategies(...args) {
const b = new Bytecode(this.bytecode).addSource('withoutStrategies', args);
- return new this.graphTraversalSourceClass(this.graph, new TraversalStrategies(this.traversalStrategies), b, this.graphTraversalSourceClass, this.graphTraversalClass);
+ return new this.graphTraversalSourceClass(
+ this.graph,
+ new TraversalStrategies(this.traversalStrategies),
+ b,
+ this.graphTraversalSourceClass,
+ this.graphTraversalClass,
+ );
}
-
+
/**
* E GraphTraversalSource step method.
* @param {...Object} args
@@ -220,7 +273,7 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('E', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
+
/**
* V GraphTraversalSource step method.
* @param {...Object} args
@@ -230,7 +283,7 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('V', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
+
/**
* addE GraphTraversalSource step method.
* @param {...Object} args
@@ -240,7 +293,7 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('addE', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
+
/**
* addV GraphTraversalSource step method.
* @param {...Object} args
@@ -250,7 +303,7 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('addV', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
+
/**
* inject GraphTraversalSource step method.
* @param {...Object} args
@@ -260,7 +313,7 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('inject', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
+
/**
* io GraphTraversalSource step method.
* @param {...Object} args
@@ -270,7 +323,6 @@ class GraphTraversalSource {
const b = new Bytecode(this.bytecode).addStep('io', args);
return new this.graphTraversalClass(this.graph, new TraversalStrategies(this.traversalStrategies), b);
}
-
}
/**
@@ -288,7 +340,6 @@ class GraphTraversal extends Traversal {
return new GraphTraversal(this.graph, this.traversalStrategies, this.getBytecode());
}
-
/**
* Graph traversal V method.
* @param {...Object} args
@@ -298,7 +349,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('V', args);
return this;
}
-
+
/**
* Graph traversal addE method.
* @param {...Object} args
@@ -308,7 +359,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('addE', args);
return this;
}
-
+
/**
* Graph traversal addV method.
* @param {...Object} args
@@ -318,7 +369,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('addV', args);
return this;
}
-
+
/**
* Graph traversal aggregate method.
* @param {...Object} args
@@ -328,7 +379,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('aggregate', args);
return this;
}
-
+
/**
* Graph traversal and method.
* @param {...Object} args
@@ -338,7 +389,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('and', args);
return this;
}
-
+
/**
* Graph traversal as method.
* @param {...Object} args
@@ -348,7 +399,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('as', args);
return this;
}
-
+
/**
* Graph traversal barrier method.
* @param {...Object} args
@@ -358,7 +409,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('barrier', args);
return this;
}
-
+
/**
* Graph traversal both method.
* @param {...Object} args
@@ -368,7 +419,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('both', args);
return this;
}
-
+
/**
* Graph traversal bothE method.
* @param {...Object} args
@@ -378,7 +429,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('bothE', args);
return this;
}
-
+
/**
* Graph traversal bothV method.
* @param {...Object} args
@@ -388,7 +439,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('bothV', args);
return this;
}
-
+
/**
* Graph traversal branch method.
* @param {...Object} args
@@ -398,7 +449,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('branch', args);
return this;
}
-
+
/**
* Graph traversal by method.
* @param {...Object} args
@@ -408,7 +459,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('by', args);
return this;
}
-
+
/**
* Graph traversal cap method.
* @param {...Object} args
@@ -418,7 +469,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('cap', args);
return this;
}
-
+
/**
* Graph traversal choose method.
* @param {...Object} args
@@ -428,7 +479,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('choose', args);
return this;
}
-
+
/**
* Graph traversal coalesce method.
* @param {...Object} args
@@ -438,7 +489,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('coalesce', args);
return this;
}
-
+
/**
* Graph traversal coin method.
* @param {...Object} args
@@ -448,7 +499,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('coin', args);
return this;
}
-
+
/**
* Graph traversal connectedComponent method.
* @param {...Object} args
@@ -458,7 +509,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('connectedComponent', args);
return this;
}
-
+
/**
* Graph traversal constant method.
* @param {...Object} args
@@ -468,7 +519,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('constant', args);
return this;
}
-
+
/**
* Graph traversal count method.
* @param {...Object} args
@@ -478,7 +529,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('count', args);
return this;
}
-
+
/**
* Graph traversal cyclicPath method.
* @param {...Object} args
@@ -488,7 +539,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('cyclicPath', args);
return this;
}
-
+
/**
* Graph traversal dedup method.
* @param {...Object} args
@@ -498,7 +549,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('dedup', args);
return this;
}
-
+
/**
* Graph traversal drop method.
* @param {...Object} args
@@ -508,7 +559,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('drop', args);
return this;
}
-
+
/**
* Graph traversal elementMap method.
* @param {...Object} args
@@ -518,7 +569,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('elementMap', args);
return this;
}
-
+
/**
* Graph traversal emit method.
* @param {...Object} args
@@ -528,7 +579,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('emit', args);
return this;
}
-
+
/**
* Graph traversal filter method.
* @param {...Object} args
@@ -538,7 +589,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('filter', args);
return this;
}
-
+
/**
* Graph traversal flatMap method.
* @param {...Object} args
@@ -548,7 +599,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('flatMap', args);
return this;
}
-
+
/**
* Graph traversal fold method.
* @param {...Object} args
@@ -558,7 +609,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('fold', args);
return this;
}
-
+
/**
* Graph traversal from method.
* @param {...Object} args
@@ -568,7 +619,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('from', args);
return this;
}
-
+
/**
* Graph traversal group method.
* @param {...Object} args
@@ -578,7 +629,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('group', args);
return this;
}
-
+
/**
* Graph traversal groupCount method.
* @param {...Object} args
@@ -588,7 +639,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('groupCount', args);
return this;
}
-
+
/**
* Graph traversal has method.
* @param {...Object} args
@@ -598,7 +649,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('has', args);
return this;
}
-
+
/**
* Graph traversal hasId method.
* @param {...Object} args
@@ -608,7 +659,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('hasId', args);
return this;
}
-
+
/**
* Graph traversal hasKey method.
* @param {...Object} args
@@ -618,7 +669,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('hasKey', args);
return this;
}
-
+
/**
* Graph traversal hasLabel method.
* @param {...Object} args
@@ -628,7 +679,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('hasLabel', args);
return this;
}
-
+
/**
* Graph traversal hasNot method.
* @param {...Object} args
@@ -638,7 +689,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('hasNot', args);
return this;
}
-
+
/**
* Graph traversal hasValue method.
* @param {...Object} args
@@ -648,7 +699,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('hasValue', args);
return this;
}
-
+
/**
* Graph traversal id method.
* @param {...Object} args
@@ -658,7 +709,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('id', args);
return this;
}
-
+
/**
* Graph traversal identity method.
* @param {...Object} args
@@ -668,7 +719,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('identity', args);
return this;
}
-
+
/**
* Graph traversal in method.
* @param {...Object} args
@@ -678,7 +729,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('in', args);
return this;
}
-
+
/**
* Graph traversal inE method.
* @param {...Object} args
@@ -688,7 +739,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('inE', args);
return this;
}
-
+
/**
* Graph traversal inV method.
* @param {...Object} args
@@ -698,7 +749,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('inV', args);
return this;
}
-
+
/**
* Graph traversal index method.
* @param {...Object} args
@@ -708,7 +759,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('index', args);
return this;
}
-
+
/**
* Graph traversal inject method.
* @param {...Object} args
@@ -718,7 +769,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('inject', args);
return this;
}
-
+
/**
* Graph traversal is method.
* @param {...Object} args
@@ -728,7 +779,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('is', args);
return this;
}
-
+
/**
* Graph traversal key method.
* @param {...Object} args
@@ -738,7 +789,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('key', args);
return this;
}
-
+
/**
* Graph traversal label method.
* @param {...Object} args
@@ -748,7 +799,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('label', args);
return this;
}
-
+
/**
* Graph traversal limit method.
* @param {...Object} args
@@ -758,7 +809,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('limit', args);
return this;
}
-
+
/**
* Graph traversal local method.
* @param {...Object} args
@@ -768,7 +819,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('local', args);
return this;
}
-
+
/**
* Graph traversal loops method.
* @param {...Object} args
@@ -778,7 +829,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('loops', args);
return this;
}
-
+
/**
* Graph traversal map method.
* @param {...Object} args
@@ -788,7 +839,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('map', args);
return this;
}
-
+
/**
* Graph traversal match method.
* @param {...Object} args
@@ -798,7 +849,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('match', args);
return this;
}
-
+
/**
* Graph traversal math method.
* @param {...Object} args
@@ -808,7 +859,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('math', args);
return this;
}
-
+
/**
* Graph traversal max method.
* @param {...Object} args
@@ -818,7 +869,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('max', args);
return this;
}
-
+
/**
* Graph traversal mean method.
* @param {...Object} args
@@ -828,7 +879,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('mean', args);
return this;
}
-
+
/**
* Graph traversal min method.
* @param {...Object} args
@@ -838,7 +889,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('min', args);
return this;
}
-
+
/**
* Graph traversal none method.
* @param {...Object} args
@@ -848,7 +899,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('none', args);
return this;
}
-
+
/**
* Graph traversal not method.
* @param {...Object} args
@@ -858,7 +909,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('not', args);
return this;
}
-
+
/**
* Graph traversal option method.
* @param {...Object} args
@@ -868,7 +919,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('option', args);
return this;
}
-
+
/**
* Graph traversal optional method.
* @param {...Object} args
@@ -878,7 +929,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('optional', args);
return this;
}
-
+
/**
* Graph traversal or method.
* @param {...Object} args
@@ -888,7 +939,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('or', args);
return this;
}
-
+
/**
* Graph traversal order method.
* @param {...Object} args
@@ -898,7 +949,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('order', args);
return this;
}
-
+
/**
* Graph traversal otherV method.
* @param {...Object} args
@@ -908,7 +959,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('otherV', args);
return this;
}
-
+
/**
* Graph traversal out method.
* @param {...Object} args
@@ -918,7 +969,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('out', args);
return this;
}
-
+
/**
* Graph traversal outE method.
* @param {...Object} args
@@ -928,7 +979,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('outE', args);
return this;
}
-
+
/**
* Graph traversal outV method.
* @param {...Object} args
@@ -938,7 +989,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('outV', args);
return this;
}
-
+
/**
* Graph traversal pageRank method.
* @param {...Object} args
@@ -948,7 +999,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('pageRank', args);
return this;
}
-
+
/**
* Graph traversal path method.
* @param {...Object} args
@@ -958,7 +1009,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('path', args);
return this;
}
-
+
/**
* Graph traversal peerPressure method.
* @param {...Object} args
@@ -968,7 +1019,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('peerPressure', args);
return this;
}
-
+
/**
* Graph traversal profile method.
* @param {...Object} args
@@ -978,7 +1029,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('profile', args);
return this;
}
-
+
/**
* Graph traversal program method.
* @param {...Object} args
@@ -988,7 +1039,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('program', args);
return this;
}
-
+
/**
* Graph traversal project method.
* @param {...Object} args
@@ -998,7 +1049,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('project', args);
return this;
}
-
+
/**
* Graph traversal properties method.
* @param {...Object} args
@@ -1008,7 +1059,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('properties', args);
return this;
}
-
+
/**
* Graph traversal property method.
* @param {...Object} args
@@ -1018,7 +1069,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('property', args);
return this;
}
-
+
/**
* Graph traversal propertyMap method.
* @param {...Object} args
@@ -1028,7 +1079,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('propertyMap', args);
return this;
}
-
+
/**
* Graph traversal range method.
* @param {...Object} args
@@ -1038,7 +1089,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('range', args);
return this;
}
-
+
/**
* Graph traversal read method.
* @param {...Object} args
@@ -1048,7 +1099,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('read', args);
return this;
}
-
+
/**
* Graph traversal repeat method.
* @param {...Object} args
@@ -1058,7 +1109,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('repeat', args);
return this;
}
-
+
/**
* Graph traversal sack method.
* @param {...Object} args
@@ -1068,7 +1119,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('sack', args);
return this;
}
-
+
/**
* Graph traversal sample method.
* @param {...Object} args
@@ -1078,7 +1129,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('sample', args);
return this;
}
-
+
/**
* Graph traversal select method.
* @param {...Object} args
@@ -1088,7 +1139,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('select', args);
return this;
}
-
+
/**
* Graph traversal shortestPath method.
* @param {...Object} args
@@ -1098,7 +1149,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('shortestPath', args);
return this;
}
-
+
/**
* Graph traversal sideEffect method.
* @param {...Object} args
@@ -1108,7 +1159,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('sideEffect', args);
return this;
}
-
+
/**
* Graph traversal simplePath method.
* @param {...Object} args
@@ -1118,7 +1169,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('simplePath', args);
return this;
}
-
+
/**
* Graph traversal skip method.
* @param {...Object} args
@@ -1128,7 +1179,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('skip', args);
return this;
}
-
+
/**
* Graph traversal store method.
* @param {...Object} args
@@ -1138,7 +1189,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('store', args);
return this;
}
-
+
/**
* Graph traversal subgraph method.
* @param {...Object} args
@@ -1148,7 +1199,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('subgraph', args);
return this;
}
-
+
/**
* Graph traversal sum method.
* @param {...Object} args
@@ -1158,7 +1209,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('sum', args);
return this;
}
-
+
/**
* Graph traversal tail method.
* @param {...Object} args
@@ -1168,7 +1219,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('tail', args);
return this;
}
-
+
/**
* Graph traversal timeLimit method.
* @param {...Object} args
@@ -1178,7 +1229,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('timeLimit', args);
return this;
}
-
+
/**
* Graph traversal times method.
* @param {...Object} args
@@ -1188,7 +1239,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('times', args);
return this;
}
-
+
/**
* Graph traversal to method.
* @param {...Object} args
@@ -1198,7 +1249,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('to', args);
return this;
}
-
+
/**
* Graph traversal toE method.
* @param {...Object} args
@@ -1208,7 +1259,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('toE', args);
return this;
}
-
+
/**
* Graph traversal toV method.
* @param {...Object} args
@@ -1218,7 +1269,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('toV', args);
return this;
}
-
+
/**
* Graph traversal tree method.
* @param {...Object} args
@@ -1228,7 +1279,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('tree', args);
return this;
}
-
+
/**
* Graph traversal unfold method.
* @param {...Object} args
@@ -1238,7 +1289,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('unfold', args);
return this;
}
-
+
/**
* Graph traversal union method.
* @param {...Object} args
@@ -1248,7 +1299,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('union', args);
return this;
}
-
+
/**
* Graph traversal until method.
* @param {...Object} args
@@ -1258,7 +1309,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('until', args);
return this;
}
-
+
/**
* Graph traversal value method.
* @param {...Object} args
@@ -1268,7 +1319,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('value', args);
return this;
}
-
+
/**
* Graph traversal valueMap method.
* @param {...Object} args
@@ -1278,7 +1329,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('valueMap', args);
return this;
}
-
+
/**
* Graph traversal values method.
* @param {...Object} args
@@ -1288,7 +1339,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('values', args);
return this;
}
-
+
/**
* Graph traversal where method.
* @param {...Object} args
@@ -1298,7 +1349,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('where', args);
return this;
}
-
+
/**
* Graph traversal with method.
* @param {...Object} args
@@ -1308,7 +1359,7 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('with', args);
return this;
}
-
+
/**
* Graph traversal write method.
* @param {...Object} args
@@ -1318,7 +1369,6 @@ class GraphTraversal extends Traversal {
this.bytecode.addStep('write', args);
return this;
}
-
}
function callOnEmptyTraversal(fnName, args) {
@@ -1420,14 +1470,15 @@ const statics = {
value: (...args) => callOnEmptyTraversal('value', args),
valueMap: (...args) => callOnEmptyTraversal('valueMap', args),
values: (...args) => callOnEmptyTraversal('values', args),
- where: (...args) => callOnEmptyTraversal('where', args)
+ where: (...args) => callOnEmptyTraversal('where', args),
};
module.exports = {
GraphTraversal,
GraphTraversalSource,
- statics
-};</code></pre>
+ statics,
+};
+</code></pre>
</article>
</section>
@@ -1443,7 +1494,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_transaction.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_transaction.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_transaction.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_transaction.js.html Mon Apr 4 12:44:34 2022
@@ -68,14 +68,19 @@ class Transaction {
*/
begin() {
if (this._sessionBasedConnection) {
- throw new Error("Transaction already started on this object");
+ throw new Error('Transaction already started on this object');
}
this._sessionBasedConnection = this._g.remoteConnection.createSession();
const traversalStrategy = new TraversalStrategies();
traversalStrategy.addStrategy(new remote.RemoteStrategy(this._sessionBasedConnection));
- return new this._g.graphTraversalSourceClass(this._g.graph, traversalStrategy, new Bytecode(this._g.bytecode),
- this._g.graphTraversalSourceClass, this._g.graphTraversalClass);
+ return new this._g.graphTraversalSourceClass(
+ this._g.graph,
+ traversalStrategy,
+ new Bytecode(this._g.bytecode),
+ this._g.graphTraversalSourceClass,
+ this._g.graphTraversalClass,
+ );
}
/**
@@ -97,21 +102,23 @@ class Transaction {
* @returns {Boolean}
*/
get isOpen() {
- this._sessionBasedConnection.isOpen;
+ return this._sessionBasedConnection.isOpen;
}
/**
* @returns {Promise}
*/
close() {
- if (this._sessionBasedConnection)
+ if (this._sessionBasedConnection) {
this._sessionBasedConnection.close();
+ }
}
}
module.exports = {
- Transaction
-};</code></pre>
+ Transaction,
+};
+</code></pre>
</article>
</section>
@@ -127,7 +134,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_translator.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_translator.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_translator.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_translator.js.html Mon Apr 4 12:44:34 2022
@@ -62,7 +62,7 @@ class Translator {
}
getTargetLanguage() {
- return "gremlin-groovy";
+ return 'gremlin-groovy';
}
of(traversalSource) {
@@ -76,10 +76,10 @@ class Translator {
* @returns {string} Gremlin-Groovy script
*/
translate(bytecodeOrTraversal, child = false) {
- let script = child ? "__" : this._traversalSource;
+ let script = child ? '__' : this._traversalSource;
const bc = bytecodeOrTraversal instanceof Bytecode ? bytecodeOrTraversal : bytecodeOrTraversal.getBytecode();
- let instructions = bc.stepInstructions;
+ const instructions = bc.stepInstructions;
// build the script from the glv instructions.
for (let i = 0; i < instructions.length; i++) {
@@ -98,7 +98,7 @@ class Translator {
script += ')';
}
-
+
return script;
}
@@ -114,10 +114,12 @@ class Translator {
script += this.translate(anyObject.getBytecode(), true);
} else if (anyObject.toString() === '[object Object]') {
Object.keys(anyObject).forEach(function (key, index) {
- if (index > 0) script += ', ';
- script += '(\'' + key + '\', ';
+ if (index > 0) {
+ script += ', ';
+ }
+ script += `('${key}', `;
if (anyObject[key] instanceof String || typeof anyObject[key] === 'string') {
- script += '\'' + anyObject[key] + '\'';
+ script += `'${anyObject[key]}'`;
} else {
script += anyObject[key];
}
@@ -137,14 +139,15 @@ class Translator {
} else if (typeof anyObject === 'number' || typeof anyObject === 'boolean') {
script += anyObject;
} else {
- script += '\'' + anyObject + '\'';
+ script += `'${anyObject}'`;
}
return script;
}
}
-module.exports = Translator;</code></pre>
+module.exports = Translator;
+</code></pre>
</article>
</section>
@@ -160,7 +163,7 @@ module.exports = Translator;</code></pre
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal-strategy.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal-strategy.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal-strategy.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal-strategy.js.html Mon Apr 4 12:44:34 2022
@@ -62,8 +62,7 @@ class TraversalStrategies {
if (parent) {
// Clone the strategies
this.strategies = [...parent.strategies];
- }
- else {
+ } else {
this.strategies = [];
}
}
@@ -75,7 +74,7 @@ class TraversalStrategies {
/** @param {TraversalStrategy} strategy */
removeStrategy(strategy) {
- const idx = this.strategies.findIndex(s => s.fqcn === strategy.fqcn);
+ const idx = this.strategies.findIndex((s) => s.fqcn === strategy.fqcn);
if (idx !== -1) {
return this.strategies.splice(idx, 1)[0];
}
@@ -89,15 +88,15 @@ class TraversalStrategies {
*/
applyStrategies(traversal) {
// Apply all strategies serially
- return this.strategies.reduce((promise, strategy) => {
- return promise.then(() => strategy.apply(traversal));
- }, Promise.resolve());
+ return this.strategies.reduce(
+ (promise, strategy) => promise.then(() => strategy.apply(traversal)),
+ Promise.resolve(),
+ );
}
}
/** @abstract */
class TraversalStrategy {
-
/**
* @param {String} fqcn fully qualified class name in Java of the strategy
* @param {Object} configuration for the strategy
@@ -112,38 +111,36 @@ class TraversalStrategy {
* @param {Traversal} traversal
* @returns {Promise}
*/
- apply(traversal) {
-
- }
+ apply(traversal) {}
}
class ConnectiveStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy');
}
}
class ElementIdStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy');
}
}
class HaltedTraverserStrategy extends TraversalStrategy {
-
/**
* @param {String} haltedTraverserFactory full qualified class name in Java of a {@code HaltedTraverserFactory} implementation
*/
constructor(haltedTraverserFactory) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy");
- if (haltedTraverserFactory !== undefined)
- this.configuration["haltedTraverserFactory"] = haltedTraverserFactory;
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy');
+ if (haltedTraverserFactory !== undefined) {
+ this.configuration['haltedTraverserFactory'] = haltedTraverserFactory;
+ }
}
}
class OptionsStrategy extends TraversalStrategy {
constructor(options) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy", options);
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy', options);
}
}
@@ -156,7 +153,7 @@ class PartitionStrategy extends Traversa
* @param {boolean} [options.includeMetaProperties] determines if meta-properties should be included in partitioning defaulting to false
*/
constructor(options) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy", options);
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy', options);
}
}
@@ -169,13 +166,16 @@ class SubgraphStrategy extends Traversal
* @param {boolean} [options.checkAdjacentVertices] enables the strategy to apply the {@code vertices} filter to the adjacent vertices of an edge.
*/
constructor(options) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy", options);
- if (this.configuration.vertices instanceof Traversal)
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy', options);
+ if (this.configuration.vertices instanceof Traversal) {
this.configuration.vertices = this.configuration.vertices.bytecode;
- if (this.configuration.edges instanceof Traversal)
+ }
+ if (this.configuration.edges instanceof Traversal) {
this.configuration.edges = this.configuration.edges.bytecode;
- if (this.configuration.vertexProperties instanceof Traversal)
+ }
+ if (this.configuration.vertexProperties instanceof Traversal) {
this.configuration.vertexProperties = this.configuration.vertexProperties.bytecode;
+ }
}
}
@@ -185,14 +185,13 @@ class ProductiveByStrategy extends Trave
* @param {Array<String>} [options.productiveKeys] set of keys that will always be productive
*/
constructor(options) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy", options);
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy', options);
}
}
class VertexProgramStrategy extends TraversalStrategy {
-
constructor(options) {
- super("org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy", options);
+ super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy', options);
}
}
@@ -201,105 +200,106 @@ class MatchAlgorithmStrategy extends Tra
* @param matchAlgorithm
*/
constructor(matchAlgorithm) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy");
- if (matchAlgorithm !== undefined)
- this.configuration["matchAlgorithm"] = matchAlgorithm;
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy');
+ if (matchAlgorithm !== undefined) {
+ this.configuration['matchAlgorithm'] = matchAlgorithm;
+ }
}
}
class AdjacentToIncidentStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy');
}
}
class FilterRankingStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy');
}
}
class IdentityRemovalStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy');
}
}
class IncidentToAdjacentStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy');
}
}
class InlineFilterStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy');
}
}
class LazyBarrierStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy');
}
}
class MatchPredicateStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy');
}
}
class OrderLimitStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy');
}
}
class PathProcessorStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy');
}
}
class PathRetractionStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy');
}
}
class CountStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy');
}
}
class RepeatUnrollStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy');
}
}
class GraphFilterStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GraphFilterStrategy');
}
}
class EarlyLimitStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy');
}
}
class LambdaRestrictionStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy');
}
}
class ReadOnlyStrategy extends TraversalStrategy {
constructor() {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy");
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy');
}
}
@@ -308,9 +308,11 @@ class EdgeLabelVerificationStrategy exte
* @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
*/
- constructor(logWarnings = false, throwException=false) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy",
- {logWarnings: logWarnings, throwException: throwException});
+ constructor(logWarnings = false, throwException = false) {
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
+ logWarnings: logWarnings,
+ throwException: throwException,
+ });
}
}
@@ -320,9 +322,12 @@ class ReservedKeysVerificationStrategy e
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
* @param {Array<String>} keys the list of reserved keys to verify
*/
- constructor(logWarnings = false, throwException=false, keys=["id", "label"]) {
- super("org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy",
- {logWarnings: logWarnings, throwException: throwException, keys: keys});
+ constructor(logWarnings = false, throwException = false, keys = ['id', 'label']) {
+ super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy', {
+ logWarnings: logWarnings,
+ throwException: throwException,
+ keys: keys,
+ });
}
}
@@ -359,8 +364,9 @@ module.exports = {
EdgeLabelVerificationStrategy: EdgeLabelVerificationStrategy,
LambdaRestrictionStrategy: LambdaRestrictionStrategy,
ReadOnlyStrategy: ReadOnlyStrategy,
- ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy
-};</code></pre>
+ ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy,
+};
+</code></pre>
</article>
</section>
@@ -376,7 +382,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/process_traversal.js.html Mon Apr 4 12:44:34 2022
@@ -48,9 +48,9 @@
/**
* @author Jorge Bay Gondra
*/
+
'use strict';
-const utils = require('../utils');
const itemDone = Object.freeze({ value: null, done: true });
const asyncIteratorSymbol = Symbol.asyncIterator || Symbol('@@asyncIterator');
@@ -91,19 +91,21 @@ class Traversal {
}
return result;
});
- };
+ }
/**
* Determines if there are any more items to iterate from the traversal.
* @returns {Promise.<boolean>}
*/
- hasNext() {
- return this._applyStrategies().then(() => {
- return this.traversers && this.traversers.length > 0 &&
- this._traversersIteratorIndex < this.traversers.length &&
- this.traversers[this._traversersIteratorIndex].bulk > 0;
- });
- }
+ hasNext() {
+ return this._applyStrategies().then(
+ () =>
+ this.traversers &&
+ this.traversers.length > 0 &&
+ this._traversersIteratorIndex < this.traversers.length &&
+ this.traversers[this._traversersIteratorIndex].bulk > 0,
+ );
+ }
/**
* Iterates all Traverser instances in the traversal.
@@ -114,6 +116,7 @@ class Traversal {
return this._applyStrategies().then(() => {
let it;
while ((it = this._getNext()) && !it.done) {
+ //
}
});
}
@@ -133,7 +136,7 @@ class Traversal {
*/
_getNext() {
while (this.traversers && this._traversersIteratorIndex < this.traversers.length) {
- let traverser = this.traversers[this._traversersIteratorIndex];
+ const traverser = this.traversers[this._traversersIteratorIndex];
if (traverser.bulk > 0) {
traverser.bulk--;
return { value: traverser.object, done: false };
@@ -148,14 +151,14 @@ class Traversal {
// Apply strategies only once
return this._traversalStrategiesPromise;
}
- return this._traversalStrategiesPromise = this.traversalStrategies.applyStrategies(this);
+ return (this._traversalStrategiesPromise = this.traversalStrategies.applyStrategies(this));
}
/**
* Returns step instructions during JSON serialization
* @returns {Array}
*/
- toJSON(){
+ toJSON() {
return this.bytecode.stepInstructions;
}
@@ -165,105 +168,102 @@ class Traversal {
*/
toString() {
return this.bytecode.toString();
- };
+ }
}
-
class IO {
+ static get graphml() {
+ return 'graphml';
+ }
- static get graphml() {
- return "graphml"
- }
-
- static get graphson() {
- return "graphson"
- }
-
- static get gryo() {
- return "gryo"
- }
-
- static get reader() {
- return "~tinkerpop.io.reader"
- }
-
- static get registry() {
- return "~tinkerpop.io.registry"
- }
-
- static get writer() {
- return "~tinkerpop.io.writer"
- }
+ static get graphson() {
+ return 'graphson';
+ }
+
+ static get gryo() {
+ return 'gryo';
+ }
+
+ static get reader() {
+ return '~tinkerpop.io.reader';
+ }
+
+ static get registry() {
+ return '~tinkerpop.io.registry';
+ }
+
+ static get writer() {
+ return '~tinkerpop.io.writer';
+ }
}
+// eslint-disable-next-line no-unused-vars
class ConnectedComponent {
+ static get component() {
+ return 'gremlin.connectedComponentVertexProgram.component';
+ }
- static get component() {
- return "gremlin.connectedComponentVertexProgram.component"
- }
-
- static get edges() {
- return "~tinkerpop.connectedComponent.edges"
- }
-
- static get propertyName() {
- return "~tinkerpop.connectedComponent.propertyName"
- }
+ static get edges() {
+ return '~tinkerpop.connectedComponent.edges';
+ }
+
+ static get propertyName() {
+ return '~tinkerpop.connectedComponent.propertyName';
+ }
}
+// eslint-disable-next-line no-unused-vars
class ShortestPath {
+ static get distance() {
+ return '~tinkerpop.shortestPath.distance';
+ }
- static get distance() {
- return "~tinkerpop.shortestPath.distance"
- }
-
- static get edges() {
- return "~tinkerpop.shortestPath.edges"
- }
-
- static get includeEdges() {
- return "~tinkerpop.shortestPath.includeEdges"
- }
-
- static get maxDistance() {
- return "~tinkerpop.shortestPath.maxDistance"
- }
-
- static get target() {
- return "~tinkerpop.shortestPath.target"
- }
+ static get edges() {
+ return '~tinkerpop.shortestPath.edges';
+ }
+
+ static get includeEdges() {
+ return '~tinkerpop.shortestPath.includeEdges';
+ }
+
+ static get maxDistance() {
+ return '~tinkerpop.shortestPath.maxDistance';
+ }
+
+ static get target() {
+ return '~tinkerpop.shortestPath.target';
+ }
}
+// eslint-disable-next-line no-unused-vars
class PageRank {
+ static get edges() {
+ return '~tinkerpop.pageRank.edges';
+ }
- static get edges() {
- return "~tinkerpop.pageRank.edges"
- }
-
- static get propertyName() {
- return "~tinkerpop.pageRank.propertyName"
- }
-
- static get times() {
- return "~tinkerpop.pageRank.times"
- }
+ static get propertyName() {
+ return '~tinkerpop.pageRank.propertyName';
+ }
+
+ static get times() {
+ return '~tinkerpop.pageRank.times';
+ }
}
+// eslint-disable-next-line no-unused-vars
class PeerPressure {
+ static get edges() {
+ return '~tinkerpop.peerPressure.edges';
+ }
- static get edges() {
- return "~tinkerpop.peerPressure.edges"
- }
-
- static get propertyName() {
- return "~tinkerpop.peerPressure.propertyName"
- }
-
- static get times() {
- return "~tinkerpop.peerPressure.times"
- }
-}
+ static get propertyName() {
+ return '~tinkerpop.peerPressure.propertyName';
+ }
+ static get times() {
+ return '~tinkerpop.peerPressure.times';
+ }
+}
class P {
/**
@@ -281,16 +281,16 @@ class P {
* @returns {string}
*/
toString() {
- function formatValue(value){
+ function formatValue(value) {
if (Array.isArray(value)) {
- let acc = [];
+ const acc = [];
for (const item of value) {
acc.push(formatValue(item));
}
return acc;
}
- if (value && typeof value === "string"){
- return "'" + value + "'";
+ if (value && typeof value === 'string') {
+ return `'${value}'`;
}
return value;
}
@@ -311,21 +311,18 @@ class P {
static within(...args) {
if (args.length === 1 && Array.isArray(args[0])) {
- return new P("within", args[0], null);
- } else {
- return new P("within", args, null);
+ return new P('within', args[0], null);
}
+ return new P('within', args, null);
}
static without(...args) {
if (args.length === 1 && Array.isArray(args[0])) {
- return new P("without", args[0], null);
- } else {
- return new P("without", args, null);
+ return new P('without', args[0], null);
}
+ return new P('without', args, null);
}
-
/** @param {...Object} args */
static between(...args) {
return createP('between', args);
@@ -380,12 +377,11 @@ class P {
static test(...args) {
return createP('test', args);
}
-
}
function createP(operator, args) {
args.unshift(null, operator);
- return new (Function.prototype.bind.apply(P, args));
+ return new (Function.prototype.bind.apply(P, args))();
}
class TextP {
@@ -404,9 +400,9 @@ class TextP {
* @returns {string}
*/
toString() {
- function formatValue(value){
- if (value && typeof value === "string"){
- return "'" + value + "'";
+ function formatValue(value) {
+ if (value && typeof value === 'string') {
+ return `'${value}'`;
}
return value;
}
@@ -454,12 +450,11 @@ class TextP {
static startingWith(...args) {
return createTextP('startingWith', args);
}
-
}
function createTextP(operator, args) {
args.unshift(null, operator);
- return new (Function.prototype.bind.apply(TextP, args));
+ return new (Function.prototype.bind.apply(TextP, args))();
}
class Traverser {
@@ -469,26 +464,24 @@ class Traverser {
}
}
-class TraversalSideEffects {
-
-}
+class TraversalSideEffects {}
const withOptions = {
- tokens: "~tinkerpop.valueMap.tokens",
+ tokens: '~tinkerpop.valueMap.tokens',
none: 0,
ids: 1,
labels: 2,
keys: 4,
values: 8,
all: 15,
- indexer: "~tinkerpop.index.indexer",
+ indexer: '~tinkerpop.index.indexer',
list: 0,
- map: 1
+ map: 1,
};
function toEnum(typeName, keys) {
const result = {};
- keys.split(' ').forEach(k => {
+ keys.split(' ').forEach((k) => {
let jsKey = k;
if (jsKey === jsKey.toUpperCase()) {
jsKey = jsKey.toLowerCase();
@@ -529,7 +522,7 @@ module.exports = {
pick: toEnum('Pick', 'any none'),
pop: toEnum('Pop', 'all first last mixed'),
scope: toEnum('Scope', 'global local'),
- t: toEnum('T', 'id key label value')
+ t: toEnum('T', 'id key label value'),
};
</code></pre>
</article>
@@ -547,7 +540,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_graph.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_graph.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_graph.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_graph.js.html Mon Apr 4 12:44:34 2022
@@ -85,7 +85,7 @@ class Element {
* @returns {boolean}
*/
equals(other) {
- return (other instanceof Element) && this.id === other.id;
+ return other instanceof Element && this.id === other.id;
}
}
@@ -147,7 +147,7 @@ class Property {
}
equals(other) {
- return (other instanceof Property) && this.key === other.key && this.value === other.value;
+ return other instanceof Property && this.key === other.key && this.value === other.value;
}
}
@@ -164,7 +164,7 @@ class Path {
}
toString() {
- return `path[${(this.objects || []).join(", ")}]`;
+ return `path[${(this.objects || []).join(', ')}]`;
}
equals(other) {
@@ -190,7 +190,7 @@ function areEqual(obj1, obj2) {
return false;
}
for (let i = 0; i < obj1.length; i++) {
- if (!areEqual(obj1[i], obj2[i])){
+ if (!areEqual(obj1[i], obj2[i])) {
return false;
}
}
@@ -214,7 +214,7 @@ module.exports = {
Path,
Property,
Vertex,
- VertexProperty
+ VertexProperty,
};
</code></pre>
</article>
@@ -232,7 +232,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_graph-serializer.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_graph-serializer.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_graph-serializer.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_graph-serializer.js.html Mon Apr 4 12:44:34 2022
@@ -57,7 +57,6 @@ const Bytecode = require('../../process/
* GraphSON2 writer.
*/
class GraphSON2Writer {
-
/**
* @param {Object} [options]
* @param {Object} [options.serializers] An object used as an associative array with GraphSON 2 type name as keys and
@@ -67,7 +66,7 @@ class GraphSON2Writer {
constructor(options) {
this._options = options || {};
// Create instance of the default serializers
- this._serializers = this.getDefaultSerializers().map(serializerConstructor => {
+ this._serializers = this.getDefaultSerializers().map((serializerConstructor) => {
const s = new serializerConstructor();
s.writer = this;
return s;
@@ -75,7 +74,7 @@ class GraphSON2Writer {
const customSerializers = this._options.serializers || {};
- Object.keys(customSerializers).forEach(key => {
+ Object.keys(customSerializers).forEach((key) => {
const s = customSerializers[key];
if (!s.serialize) {
return;
@@ -112,7 +111,7 @@ class GraphSON2Writer {
if (Array.isArray(value)) {
// We need to handle arrays when there is no serializer
// for older versions of GraphSON
- return value.map(item => this.adaptObject(item));
+ return value.map((item) => this.adaptObject(item));
}
// Default (strings / objects / ...)
@@ -140,7 +139,7 @@ class GraphSON2Writer {
req.args['gremlin'] = this.adaptObject(req.args['gremlin']);
}
- return Buffer.from( JSON.stringify(req) );
+ return Buffer.from(JSON.stringify(req));
}
/**
@@ -152,15 +151,16 @@ class GraphSON2Writer {
*/
_adaptArgs(args, protocolLevel) {
if (args instanceof Object) {
- let newObj = {};
+ const newObj = {};
Object.keys(args).forEach((key) => {
// bindings key (at the protocol-level needs special handling. without this, it wraps the generated Map
// in another map for types like EnumValue. Could be a nicer way to do this but for now it's solving the
// problem with script submission of non JSON native types
- if (protocolLevel && key === 'bindings')
+ if (protocolLevel && key === 'bindings') {
newObj[key] = this._adaptArgs(args[key], false);
- else
+ } else {
newObj[key] = this.adaptObject(args[key]);
+ }
});
return newObj;
@@ -195,7 +195,7 @@ class GraphSON2Reader {
this._deserializers = {};
const defaultDeserializers = this.getDefaultDeserializers();
- Object.keys(defaultDeserializers).forEach(typeName => {
+ Object.keys(defaultDeserializers).forEach((typeName) => {
const serializerConstructor = defaultDeserializers[typeName];
const s = new serializerConstructor();
s.reader = this;
@@ -204,7 +204,7 @@ class GraphSON2Reader {
if (this._options.serializers) {
const customSerializers = this._options.serializers || {};
- Object.keys(customSerializers).forEach(key => {
+ Object.keys(customSerializers).forEach((key) => {
const s = customSerializers[key];
if (!s.deserialize) {
return;
@@ -231,7 +231,7 @@ class GraphSON2Reader {
return null;
}
if (Array.isArray(obj)) {
- return obj.map(item => this.read(item));
+ return obj.map((item) => this.read(item));
}
const type = obj[typeSerializers.typeKey];
if (type) {
@@ -250,7 +250,7 @@ class GraphSON2Reader {
}
readResponse(buffer) {
- return this.read( JSON.parse(buffer.toString()) );
+ return this.read(JSON.parse(buffer.toString()));
}
_deserializeObject(obj) {
@@ -275,9 +275,9 @@ class GraphSON3Reader extends GraphSON2R
const graphSON2Deserializers = {
'g:Traverser': typeSerializers.TraverserSerializer,
'g:TraversalStrategy': typeSerializers.TraversalStrategySerializer,
- 'g:Int32': typeSerializers.NumberSerializer,
- 'g:Int64': typeSerializers.NumberSerializer,
- 'g:Float': typeSerializers.NumberSerializer,
+ 'g:Int32': typeSerializers.NumberSerializer,
+ 'g:Int64': typeSerializers.NumberSerializer,
+ 'g:Float': typeSerializers.NumberSerializer,
'g:Double': typeSerializers.NumberSerializer,
'g:Date': typeSerializers.DateSerializer,
'g:Direction': typeSerializers.DirectionSerializer,
@@ -288,13 +288,13 @@ const graphSON2Deserializers = {
'g:Path': typeSerializers.Path3Serializer,
'g:TextP': typeSerializers.TextPSerializer,
'g:T': typeSerializers.TSerializer,
- 'g:BulkSet': typeSerializers.BulkSetSerializer
+ 'g:BulkSet': typeSerializers.BulkSetSerializer,
};
const graphSON3Deserializers = Object.assign({}, graphSON2Deserializers, {
'g:List': typeSerializers.ListSerializer,
'g:Set': typeSerializers.SetSerializer,
- 'g:Map': typeSerializers.MapSerializer
+ 'g:Map': typeSerializers.MapSerializer,
});
const graphSON2Serializers = [
@@ -309,13 +309,13 @@ const graphSON2Serializers = [
typeSerializers.EnumSerializer,
typeSerializers.VertexSerializer,
typeSerializers.EdgeSerializer,
- typeSerializers.LongSerializer
+ typeSerializers.LongSerializer,
];
const graphSON3Serializers = graphSON2Serializers.concat([
typeSerializers.ListSerializer,
typeSerializers.SetSerializer,
- typeSerializers.MapSerializer
+ typeSerializers.MapSerializer,
]);
module.exports = {
@@ -324,8 +324,9 @@ module.exports = {
GraphSON2Writer,
GraphSON2Reader,
GraphSONWriter: GraphSON3Writer,
- GraphSONReader: GraphSON3Reader
-};</code></pre>
+ GraphSONReader: GraphSON3Reader,
+};
+</code></pre>
</article>
</section>
@@ -341,7 +342,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
Modified: tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_type-serializers.js.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_type-serializers.js.html?rev=1899554&r1=1899553&r2=1899554&view=diff
==============================================================================
--- tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_type-serializers.js.html (original)
+++ tinkerpop/site/jsdocs/3.5.3-SNAPSHOT/structure_io_type-serializers.js.html Mon Apr 4 12:44:34 2022
@@ -81,38 +81,36 @@ class NumberSerializer extends TypeSeria
if (isNaN(item)) {
return {
[typeKey]: 'g:Double',
- [valueKey]: 'NaN'
+ [valueKey]: 'NaN',
};
} else if (item === Number.POSITIVE_INFINITY) {
return {
[typeKey]: 'g:Double',
- [valueKey]: 'Infinity'
+ [valueKey]: 'Infinity',
};
} else if (item === Number.NEGATIVE_INFINITY) {
return {
[typeKey]: 'g:Double',
- [valueKey]: '-Infinity'
+ [valueKey]: '-Infinity',
};
- } else {
- return item;
}
+ return item;
}
deserialize(obj) {
- var val = obj[valueKey];
+ const val = obj[valueKey];
if (val === 'NaN') {
return NaN;
} else if (val === 'Infinity') {
return Number.POSITIVE_INFINITY;
} else if (val === '-Infinity') {
return Number.NEGATIVE_INFINITY;
- } else {
- return parseFloat(val);
}
+ return parseFloat(val);
}
canBeUsedFor(value) {
- return (typeof value === 'number');
+ return typeof value === 'number';
}
}
@@ -120,7 +118,7 @@ class DateSerializer extends TypeSeriali
serialize(item) {
return {
[typeKey]: 'g:Date',
- [valueKey]: item.getTime()
+ [valueKey]: item.getTime(),
};
}
@@ -129,7 +127,7 @@ class DateSerializer extends TypeSeriali
}
canBeUsedFor(value) {
- return (value instanceof Date);
+ return value instanceof Date;
}
}
@@ -137,12 +135,12 @@ class LongSerializer extends TypeSeriali
serialize(item) {
return {
[typeKey]: 'g:Int64',
- [valueKey]: item.value
+ [valueKey]: item.value,
};
}
canBeUsedFor(value) {
- return (value instanceof utils.Long);
+ return value instanceof utils.Long;
}
}
@@ -154,7 +152,7 @@ class BytecodeSerializer extends TypeSer
}
const result = {};
result[typeKey] = 'g:Bytecode';
- const resultValue = result[valueKey] = {};
+ const resultValue = (result[valueKey] = {});
const sources = this._serializeInstructions(bytecode.sourceInstructions);
if (sources) {
resultValue['source'] = sources;
@@ -173,13 +171,13 @@ class BytecodeSerializer extends TypeSer
const result = new Array(instructions.length);
result[0] = instructions[0];
for (let i = 0; i < instructions.length; i++) {
- result[i] = instructions[i].map(item => this.writer.adaptObject(item));
+ result[i] = instructions[i].map((item) => this.writer.adaptObject(item));
}
return result;
}
canBeUsedFor(value) {
- return (value instanceof Bytecode) || (value instanceof t.Traversal);
+ return value instanceof Bytecode || value instanceof t.Traversal;
}
}
@@ -188,20 +186,19 @@ class PSerializer extends TypeSerializer
serialize(item) {
const result = {};
result[typeKey] = 'g:P';
- const resultValue = result[valueKey] = {
- 'predicate': item.operator
- };
+ const resultValue = (result[valueKey] = {
+ predicate: item.operator,
+ });
if (item.other === undefined || item.other === null) {
resultValue['value'] = this.writer.adaptObject(item.value);
- }
- else {
- resultValue['value'] = [ this.writer.adaptObject(item.value), this.writer.adaptObject(item.other) ];
+ } else {
+ resultValue['value'] = [this.writer.adaptObject(item.value), this.writer.adaptObject(item.other)];
}
return result;
}
canBeUsedFor(value) {
- return (value instanceof t.P);
+ return value instanceof t.P;
}
}
@@ -210,20 +207,19 @@ class TextPSerializer extends TypeSerial
serialize(item) {
const result = {};
result[typeKey] = 'g:TextP';
- const resultValue = result[valueKey] = {
- 'predicate': item.operator
- };
+ const resultValue = (result[valueKey] = {
+ predicate: item.operator,
+ });
if (item.other === undefined || item.other === null) {
resultValue['value'] = this.writer.adaptObject(item.value);
- }
- else {
- resultValue['value'] = [ this.writer.adaptObject(item.value), this.writer.adaptObject(item.other) ];
+ } else {
+ resultValue['value'] = [this.writer.adaptObject(item.value), this.writer.adaptObject(item.other)];
}
return result;
}
canBeUsedFor(value) {
- return (value instanceof t.TextP);
+ return value instanceof t.TextP;
}
}
@@ -233,27 +229,30 @@ class LambdaSerializer extends TypeSeria
const lambdaDef = item();
// check if the language is specified otherwise assume gremlin-groovy.
- const returnIsString = typeof(lambdaDef) === 'string';
+ const returnIsString = typeof lambdaDef === 'string';
const script = returnIsString ? lambdaDef : lambdaDef[0];
- const lang = returnIsString ? "gremlin-groovy" : lambdaDef[1];
+ const lang = returnIsString ? 'gremlin-groovy' : lambdaDef[1];
// detect argument count
- const argCount = lang === "gremlin-groovy" && script.includes("->") ?
- (script.substring(0, script.indexOf("->")).includes(",") ? 2 : 1) :
- -1;
+ const argCount =
+ lang === 'gremlin-groovy' && script.includes('->')
+ ? script.substring(0, script.indexOf('->')).includes(',')
+ ? 2
+ : 1
+ : -1;
return {
[typeKey]: 'g:Lambda',
[valueKey]: {
- 'arguments': argCount,
- 'language': lang,
- 'script': script
- }
+ arguments: argCount,
+ language: lang,
+ script: script,
+ },
};
}
canBeUsedFor(value) {
- return (typeof value === 'function');
+ return typeof value === 'function';
}
}
@@ -262,7 +261,7 @@ class EnumSerializer extends TypeSeriali
serialize(item) {
return {
[typeKey]: 'g:' + item.typeName,
- [valueKey]: item.elementName
+ [valueKey]: item.elementName,
};
}
@@ -277,9 +276,9 @@ class TraverserSerializer extends TypeSe
return {
[typeKey]: 'g:Traverser',
[valueKey]: {
- 'value': this.writer.adaptObject(item.object),
- 'bulk': this.writer.adaptObject(item.bulk)
- }
+ value: this.writer.adaptObject(item.object),
+ bulk: this.writer.adaptObject(item.bulk),
+ },
};
}
@@ -289,7 +288,7 @@ class TraverserSerializer extends TypeSe
}
canBeUsedFor(value) {
- return (value instanceof t.Traverser);
+ return value instanceof t.Traverser;
}
}
@@ -297,7 +296,7 @@ class TraversalStrategySerializer extend
/** @param {TraversalStrategy} item */
serialize(item) {
const conf = {};
- for (let k in item.configuration) {
+ for (const k in item.configuration) {
if (item.configuration.hasOwnProperty(k)) {
conf[k] = this.writer.adaptObject(item.configuration[k]);
}
@@ -305,12 +304,12 @@ class TraversalStrategySerializer extend
return {
[typeKey]: 'g:' + item.constructor.name,
- [valueKey]: conf
+ [valueKey]: conf,
};
}
canBeUsedFor(value) {
- return (value instanceof ts.TraversalStrategy);
+ return value instanceof ts.TraversalStrategy;
}
}
@@ -325,14 +324,14 @@ class VertexSerializer extends TypeSeria
return {
[typeKey]: 'g:Vertex',
[valueKey]: {
- 'id': this.writer.adaptObject(item.id),
- 'label': item.label
- }
+ id: this.writer.adaptObject(item.id),
+ label: item.label,
+ },
};
}
canBeUsedFor(value) {
- return (value instanceof g.Vertex);
+ return value instanceof g.Vertex;
}
}
@@ -343,7 +342,7 @@ class VertexPropertySerializer extends T
this.reader.read(value['id']),
value['label'],
this.reader.read(value['value']),
- this.reader.read(value['properties'])
+ this.reader.read(value['properties']),
);
}
}
@@ -351,9 +350,7 @@ class VertexPropertySerializer extends T
class PropertySerializer extends TypeSerializer {
deserialize(obj) {
const value = obj[valueKey];
- return new g.Property(
- value['key'],
- this.reader.read(value['value']));
+ return new g.Property(value['key'], this.reader.read(value['value']));
}
}
@@ -365,7 +362,7 @@ class EdgeSerializer extends TypeSeriali
new g.Vertex(this.reader.read(value['outV']), this.reader.read(value['outVLabel'])),
value['label'],
new g.Vertex(this.reader.read(value['inV']), this.reader.read(value['inVLabel'])),
- this.reader.read(value['properties'])
+ this.reader.read(value['properties']),
);
}
@@ -374,25 +371,25 @@ class EdgeSerializer extends TypeSeriali
return {
[typeKey]: 'g:Edge',
[valueKey]: {
- 'id': this.writer.adaptObject(item.id),
- 'label': item.label,
- 'outV': this.writer.adaptObject(item.outV.id),
- 'outVLabel': item.outV.label,
- 'inV': this.writer.adaptObject(item.inV.id),
- 'inVLabel': item.inV.label
- }
+ id: this.writer.adaptObject(item.id),
+ label: item.label,
+ outV: this.writer.adaptObject(item.outV.id),
+ outVLabel: item.outV.label,
+ inV: this.writer.adaptObject(item.inV.id),
+ inVLabel: item.inV.label,
+ },
};
}
canBeUsedFor(value) {
- return (value instanceof g.Edge);
+ return value instanceof g.Edge;
}
}
class PathSerializer extends TypeSerializer {
deserialize(obj) {
const value = obj[valueKey];
- const objects = value['objects'].map(o => this.reader.read(o));
+ const objects = value['objects'].map((o) => this.reader.read(o));
return new g.Path(this.reader.read(value['labels']), objects);
}
}
@@ -411,9 +408,9 @@ class TSerializer extends TypeSerializer
}
class DirectionSerializer extends TypeSerializer {
- deserialize(obj) {
- return t.direction[obj[valueKey].toLowerCase()];
- }
+ deserialize(obj) {
+ return t.direction[obj[valueKey].toLowerCase()];
+ }
}
class ArraySerializer extends TypeSerializer {
@@ -427,14 +424,14 @@ class ArraySerializer extends TypeSerial
if (!Array.isArray(value)) {
throw new Error('Expected Array, obtained: ' + value);
}
- return value.map(x => this.reader.read(x));
+ return value.map((x) => this.reader.read(x));
}
/** @param {Array} item */
serialize(item) {
return {
[typeKey]: this.typeKey,
- [valueKey]: item.map(x => this.writer.adaptObject(x))
+ [valueKey]: item.map((x) => this.writer.adaptObject(x)),
};
}
@@ -445,22 +442,22 @@ class ArraySerializer extends TypeSerial
class BulkSetSerializer extends TypeSerializer {
deserialize(obj) {
- const value = obj[valueKey];
- if (!Array.isArray(value)) {
- throw new Error('Expected Array, obtained: ' + value);
- }
+ const value = obj[valueKey];
+ if (!Array.isArray(value)) {
+ throw new Error('Expected Array, obtained: ' + value);
+ }
- // coerce the BulkSet to List. if the bulk exceeds the int space then we can't coerce to List anyway,
- // so this query will be trouble. we'd need a legit BulkSet implementation here in js. this current
- // implementation is here to replicate the previous functionality that existed on the server side in
- // previous versions.
- let result = [];
- for (let ix = 0, iy = value.length; ix < iy; ix += 2) {
- const pair = value.slice(ix, ix + 2);
- result = result.concat(Array(this.reader.read(pair[1])).fill(this.reader.read(pair[0])));
- }
+ // coerce the BulkSet to List. if the bulk exceeds the int space then we can't coerce to List anyway,
+ // so this query will be trouble. we'd need a legit BulkSet implementation here in js. this current
+ // implementation is here to replicate the previous functionality that existed on the server side in
+ // previous versions.
+ let result = [];
+ for (let ix = 0, iy = value.length; ix < iy; ix += 2) {
+ const pair = value.slice(ix, ix + 2);
+ result = result.concat(Array(this.reader.read(pair[1])).fill(this.reader.read(pair[0])));
+ }
- return result;
+ return result;
}
}
@@ -486,7 +483,7 @@ class MapSerializer extends TypeSerializ
});
return {
[typeKey]: 'g:Map',
- [valueKey]: arr
+ [valueKey]: arr,
};
}
@@ -531,7 +528,7 @@ module.exports = {
typeKey,
valueKey,
VertexPropertySerializer,
- VertexSerializer
+ VertexSerializer,
};
</code></pre>
</article>
@@ -549,7 +546,7 @@ module.exports = {
<br class="clear">
<footer>
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Fri Mar 11 2022 13:35:47 GMT-0500 (Eastern Standard Time)
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 04 2022 08:43:30 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>