UNPKG

gremlin

Version:

JavaScript Gremlin Language Variant

731 lines (204 loc) 12.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: AnonymousTraversalSource</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: AnonymousTraversalSource</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>AnonymousTraversalSource<span class="signature">(traversalSourceClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2> <div class="class-description">Provides a unified way to construct a <code>TraversalSource</code> from the perspective of the traversal. In this syntax the user is creating the source and binding it to a reference which is either an existing <code>Graph</code> instance or a <code>RemoteConnection</code>.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="AnonymousTraversalSource"><span class="type-signature"></span>new AnonymousTraversalSource<span class="signature">(traversalSourceClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new instance of {@code AnonymousTraversalSource}. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>traversalSourceClass</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Optional {@code GraphTraversalSource} constructor.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="process_anonymous-traversal.js.html">process/anonymous-traversal.js</a>, <a href="process_anonymous-traversal.js.html#line32">line 32</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".traversal"><span class="type-signature">(static) </span>traversal<span class="signature">(traversalSourceClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a>}</span></h4> <div class="description"> Constructs an {@code AnonymousTraversalSource} which will then be configured to spawn a <a href="GraphTraversalSource.html">GraphTraversalSource</a>. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>traversalSourceClass</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Optional {@code GraphTraversalSource} constructor.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="process_anonymous-traversal.js.html">process/anonymous-traversal.js</a>, <a href="process_anonymous-traversal.js.html#line47">line 47</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> . </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></span> </dd> </dl> <h4 class="name" id="withGraph"><span class="type-signature"></span>withGraph<span class="signature">(graph)</span><span class="type-signature"> &rarr; {<a href="GraphTraversalSource.html">GraphTraversalSource</a>}</span></h4> <div class="description"> Creates the specified <a href="GraphTraversalSource.html">GraphTraversalSource</a> binding an embedded <a href="Graph.html">Graph</a> as its reference such that traversals spawned from it will execute over that reference. As there are no "embedded Graph" instances in gremlin-javascript as there on the JVM, the <a href="GraphTraversalSource.html">GraphTraversalSource</a> can only ever be constructed as "empty" with a <a href="Graph.html">Graph</a> instance (which is only a reference to a graph and is not capable of holding data). As a result, the <a href="GraphTraversalSource.html">GraphTraversalSource</a> will do nothing unless a "remote" is then assigned to it later. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>graph</code></td> <td class="type"> <span class="param-type"><a href="Graph.html">Graph</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>As of release 3.4.9, prefer withRemote until some form of "embedded graph" becomes available at which point there will be support for {@code withEmbedded} which is part of the canonical Java API.</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="process_anonymous-traversal.js.html">process/anonymous-traversal.js</a>, <a href="process_anonymous-traversal.js.html#line72">line 72</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="GraphTraversalSource.html">GraphTraversalSource</a></span> </dd> </dl> <h4 class="name" id="withRemote"><span class="type-signature"></span>withRemote<span class="signature">(remoteConnection)</span><span class="type-signature"> &rarr; {<a href="GraphTraversalSource.html">GraphTraversalSource</a>}</span></h4> <div class="description"> Creates a <a href="GraphTraversalSource.html">GraphTraversalSource</a> binding a <a href="RemoteConnection.html">RemoteConnection</a> to a remote <a href="Graph.html">Graph</a> instances as its reference so that traversals spawned from it will execute over that reference. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>remoteConnection</code></td> <td class="type"> <span class="param-type"><a href="RemoteConnection.html">RemoteConnection</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="process_anonymous-traversal.js.html">process/anonymous-traversal.js</a>, <a href="process_anonymous-traversal.js.html#line57">line 57</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="GraphTraversalSource.html">GraphTraversalSource</a></span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnonymousTraversalSource.html">AnonymousTraversalSource</a></li><li><a href="Authenticator.html">Authenticator</a></li><li><a href="Bytecode.html">Bytecode</a></li><li><a href="CardinalityValue.html">CardinalityValue</a></li><li><a href="Client.html">Client</a></li><li><a href="Connection.html">Connection</a></li><li><a href="DriverRemoteConnection.html">DriverRemoteConnection</a></li><li><a href="EdgeLabelVerificationStrategy.html">EdgeLabelVerificationStrategy</a></li><li><a href="Graph.html">Graph</a></li><li><a href="GraphSON2Reader.html">GraphSON2Reader</a></li><li><a href="GraphSON2Writer.html">GraphSON2Writer</a></li><li><a href="GraphSON3Reader.html">GraphSON3Reader</a></li><li><a href="GraphSON3Writer.html">GraphSON3Writer</a></li><li><a href="GraphTraversal.html">GraphTraversal</a></li><li><a href="GraphTraversalSource.html">GraphTraversalSource</a></li><li><a href="HaltedTraverserStrategy.html">HaltedTraverserStrategy</a></li><li><a href="MatchAlgorithmStrategy.html">MatchAlgorithmStrategy</a></li><li><a href="module.exports.html">exports</a></li><li><a href="P.html">P</a></li><li><a href="PartitionStrategy.html">PartitionStrategy</a></li><li><a href="Path.html">Path</a></li><li><a href="PlainTextSaslAuthenticator.html">PlainTextSaslAuthenticator</a></li><li><a href="ProductiveByStrategy.html">ProductiveByStrategy</a></li><li><a href="RemoteConnection.html">RemoteConnection</a></li><li><a href="RemoteStrategy.html">RemoteStrategy</a></li><li><a href="RemoteTraversal.html">RemoteTraversal</a></li><li><a href="ReservedKeysVerificationStrategy.html">ReservedKeysVerificationStrategy</a></li><li><a href="ResponseError.html">ResponseError</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="SaslAuthenticator.html">SaslAuthenticator</a></li><li><a href="SaslMechanismBase.html">SaslMechanismBase</a></li><li><a href="SaslMechanismPlain.html">SaslMechanismPlain</a></li><li><a href="SeedStrategy.html">SeedStrategy</a></li><li><a href="SubgraphStrategy.html">SubgraphStrategy</a></li><li><a href="TextP.html">TextP</a></li><li><a href="Transaction.html">Transaction</a></li><li><a href="Translator.html">Translator</a></li><li><a href="TraversalStrategies.html">TraversalStrategies</a></li><li><a href="TraversalStrategy.html">TraversalStrategy</a></li><li><a href="TypeSerializer.html">TypeSerializer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#DataType">DataType</a></li><li><a href="global.html#statics">statics</a></li><li><a href="global.html#toArrayBuffer">toArrayBuffer</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Aug 08 2025 09:56:43 GMT-0700 (Pacific Daylight Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>