UNPKG

gremlin

Version:

JavaScript Gremlin Language Variant

1,192 lines (301 loc) 17.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Connection</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: Connection</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Connection<span class="signature">(url, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2> <div class="class-description">Represents a single connection to a Gremlin Server.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Connection"><span class="type-signature"></span>new Connection<span class="signature">(url, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new instance of <a href="Connection.html">Connection</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>url</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> </td> <td class="description last">The resource uri.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The connection options. <h6>Properties</h6> <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>ca</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Trusted certificates.</td> </tr> <tr> <td class="name"><code>cert</code></td> <td class="type"> <span class="param-type">String</span> | <span class="param-type">Array</span> | <span class="param-type">Buffer</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The certificate key.</td> </tr> <tr> <td class="name"><code>mimeType</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The mime type to use.</td> </tr> <tr> <td class="name"><code>pfx</code></td> <td class="type"> <span class="param-type">String</span> | <span class="param-type">Buffer</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The private key, certificate, and CA certs.</td> </tr> <tr> <td class="name"><code>reader</code></td> <td class="type"> <span class="param-type">GraphSONReader</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The reader to use.</td> </tr> <tr> <td class="name"><code>rejectUnauthorized</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Determines whether to verify or not the server certificate.</td> </tr> <tr> <td class="name"><code>traversalSource</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The traversal source. Defaults to: 'g'.</td> </tr> <tr> <td class="name"><code>writer</code></td> <td class="type"> <span class="param-type">GraphSONWriter</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The writer to use.</td> </tr> <tr> <td class="name"><code>authenticator</code></td> <td class="type"> <span class="param-type"><a href="Authenticator.html">Authenticator</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The authentication handler to use.</td> </tr> <tr> <td class="name"><code>headers</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">An associative array containing the additional header key/values for the initial request.</td> </tr> <tr> <td class="name"><code>enableUserAgentOnConnect</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Determines if a user agent will be sent during connection handshake. Defaults to: true</td> </tr> <tr> <td class="name"><code>agent</code></td> <td class="type"> <span class="param-type">http.Agent</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The http.Agent implementation to use.</td> </tr> <tr> <td class="name"><code>enableCompression</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Enable per-message deflate compression. Defaults to: false.</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line51">line 51</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="mimeType"><span class="type-signature"></span>mimeType<span class="type-signature"> :String</span></h4> <div class="description"> Gets the MIME type. </div> <h5>Type:</h5> <ul> <li> <span class="param-type">String</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line81">line 81</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4> <div class="description"> Closes the Connection. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line439">line 439</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="open"><span class="type-signature">(async) </span>open<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4> <div class="description"> Opens the connection, if its not already opened. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line105">line 105</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="stream"><span class="type-signature"></span>stream<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line207">line 207</a> </li></ul></dd> </dl> <h4 class="name" id="submit"><span class="type-signature"></span>submit<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="driver_connection.js.html">driver/connection.js</a>, <a href="driver_connection.js.html#line174">line 174</a> </li></ul></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>