Constructor
new Client(url, optionsopt)
    Creates a new instance of Client.
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url | 
            
            String | The resource uri. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            The connection options.
                Properties
  | 
        
- Source:
 
Members
isOpen
    Returns true if the underlying connection is open
- Source:
 
Methods
addListener(event, handler)
    Adds an event listener to the connection
    Parameters:
| Name | Type | Description | 
|---|---|---|
event | 
            
            String | The event name that you want to listen to. | 
handler | 
            
            function | The callback to be called when the event occurs. | 
- Source:
 
close() → {Promise}
    Closes the underlying connection
send session close request before connection close if session mode
- Source:
 
Returns:
- Type
 - Promise
 
open() → {Promise}
    Opens the underlying connection to the Gremlin Server, if it's not already opened.
- Source:
 
Returns:
- Type
 - Promise
 
removeListener(event, handler)
    Removes a previowsly added event listener to the connection
    Parameters:
| Name | Type | Description | 
|---|---|---|
event | 
            
            String | The event name that you want to listen to. | 
handler | 
            
            function | The event handler to be removed. | 
- Source:
 
stream(message, bindingsopt, requestOptionsopt) → {ReadableStream}
    Send a request to the Gremlin Server and receive a stream for the results, can send a script or bytecode steps.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
message | 
            
            Bytecode | string | The bytecode or script to send | |
bindings | 
            
            Object | 
                
                    <optional> | 
            
            
            The script bindings, if any. | 
requestOptions | 
            
            RequestOptions | 
                
                    <optional> | 
            
            
            Configuration specific to the current request. | 
- Source:
 
Returns:
- Type
 - ReadableStream
 
submit(message, bindingsopt, requestOptionsopt) → {Promise}
    Send a request to the Gremlin Server, can send a script or bytecode steps.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
message | 
            
            Bytecode | string | The bytecode or script to send | |
bindings | 
            
            Object | 
                
                    <optional> | 
            
            
            The script bindings, if any. | 
requestOptions | 
            
            RequestOptions | 
                
                    <optional> | 
            
            
            Configuration specific to the current request. | 
- Source:
 
Returns:
- Type
 - Promise