|
def | __init__ (self) |
|
def | open (self, ip, port, timeout, use_http2=False, http_headers=None) |
|
def | open_SSL (self, ip, port, timeout, ssl_config=None, use_http2=False, http_headers=None) |
|
def | authenticate (self, user_name, password) |
|
def | execute (self, session_id, stmt) |
|
def | execute_parameter (self, session_id, stmt, params) |
|
def | execute_json (self, session_id, stmt) |
|
def | execute_json_with_parameter (self, session_id, stmt, params) |
|
def | signout (self, session_id) |
|
def | close (self) |
|
def | ping (self) |
|
def | reset (self) |
|
def | idle_time (self) |
|
def | get_address (self) |
|
|
| start_use_time |
|
| use_http2 |
|
| http_headers |
|
Definition at line 35 of file Connection.py.
◆ authenticate()
def authenticate |
( |
|
self, |
|
|
|
user_name, |
|
|
|
password |
|
) |
| |
authenticate to graphd
:param user_name: the user name
:param password: the password
:return:
Definition at line 164 of file Connection.py.
◆ close()
close the connection
:return: void
Definition at line 268 of file Connection.py.
◆ execute()
def execute |
( |
|
self, |
|
|
|
session_id, |
|
|
|
stmt |
|
) |
| |
execute interface with session_id and ngql
:param session_id: the session id get from result of authenticate interface
:param stmt: the ngql
:return: ExecutionResponse
Definition at line 186 of file Connection.py.
◆ execute_json()
def execute_json |
( |
|
self, |
|
|
|
session_id, |
|
|
|
stmt |
|
) |
| |
execute_json interface with session_id and ngql
:param session_id: the session id get from result of authenticate interface
:param stmt: the ngql
:return: string json representing the execution result
Definition at line 220 of file Connection.py.
◆ execute_json_with_parameter()
def execute_json_with_parameter |
( |
|
self, |
|
|
|
session_id, |
|
|
|
stmt, |
|
|
|
params |
|
) |
| |
execute_json interface with session_id and ngql with parameter
:param session_id: the session id get from result of authenticate interface
:param stmt: the ngql
:param params: parameter map
:return: json bytes representing the execution result
Definition at line 228 of file Connection.py.
◆ execute_parameter()
def execute_parameter |
( |
|
self, |
|
|
|
session_id, |
|
|
|
stmt, |
|
|
|
params |
|
) |
| |
execute interface with session_id and ngql
:param session_id: the session id get from result of authenticate interface
:param stmt: the ngql
:param params: parameter map
:return: ExecutionResponse
Definition at line 195 of file Connection.py.
◆ get_address()
get the address of the connected service
:return: (ip, port)
Definition at line 308 of file Connection.py.
◆ idle_time()
get idletime of connection
:return: idletime
Definition at line 299 of file Connection.py.
◆ open()
def open |
( |
|
self, |
|
|
|
ip, |
|
|
|
port, |
|
|
|
timeout, |
|
|
|
use_http2 = False , |
|
|
|
http_headers = None |
|
) |
| |
open the connection
:param ip: the server ip
:param port: the server port
:param timeout: the timeout for connect and execute
:param use_http2: use http2 or not
:param http_headers: http headers
:return: void
Definition at line 49 of file Connection.py.
◆ open_SSL()
def open_SSL |
( |
|
self, |
|
|
|
ip, |
|
|
|
port, |
|
|
|
timeout, |
|
|
|
ssl_config = None , |
|
|
|
use_http2 = False , |
|
|
|
http_headers = None |
|
) |
| |
open the SSL connection
:param ip: the server ip
:param port: the server port
:param timeout: the timeout for connect and execute
:ssl_config: configs for SSL
:param use_http2: use http2 or not
:param http_headers: http headers
:return: void
Definition at line 61 of file Connection.py.
◆ ping()
check the connection if ok
:return: True or False
Definition at line 282 of file Connection.py.
◆ reset()
◆ signout()
def signout |
( |
|
self, |
|
|
|
session_id |
|
) |
| |
tells the graphd can release the session info
:param session_id:the session id
:return: void
Definition at line 256 of file Connection.py.
The documentation for this class was generated from the following file: