NebulaGraph Python Client  release-3.8
Connection Class Reference
+ Inheritance diagram for Connection:
+ Collaboration diagram for Connection:

Public Member Functions

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)
 

Public Attributes

 start_use_time
 
 use_http2
 
 http_headers
 

Static Public Attributes

bool is_used = False
 

Detailed Description

Definition at line 35 of file Connection.py.

Member Function Documentation

◆ 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.

+ Here is the call graph for this function:

◆ close()

def close (   self)
close the connection

:return: void

Definition at line 268 of file Connection.py.

+ Here is the caller graph for this function:

◆ 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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

+ Here is the call graph for this function:

◆ 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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_address()

def get_address (   self)
get the address of the connected service

:return: (ip, port)

Definition at line 308 of file Connection.py.

◆ idle_time()

def idle_time (   self)
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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ping()

def ping (   self)
check the connection if ok
:return: True or False

Definition at line 282 of file Connection.py.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

def reset (   self)
reset the idletime

:return: void

Definition at line 292 of file Connection.py.

◆ 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.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: