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

Public Member Functions

def __init__ (self)
 
def open (self, ip, port, timeout)
 
def open_SSL (self, ip, port, timeout, ssl_config=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
 

Static Public Attributes

bool is_used = False
 

Detailed Description

Definition at line 33 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 110 of file Connection.py.

+ Here is the call graph for this function:

◆ close()

def close (   self)
close the connection

:return: void

Definition at line 210 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 131 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 165 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: string json representing the execution result

Definition at line 173 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 140 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 248 of file Connection.py.

◆ idle_time()

def idle_time (   self)
get idletime of connection

:return: idletime

Definition at line 239 of file Connection.py.

◆ open()

def open (   self,
  ip,
  port,
  timeout 
)
open the connection

:param ip: the server ip
:param port: the server port
:param timeout: the timeout for connect and execute
:return: void

Definition at line 44 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 
)
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
:return: void

Definition at line 54 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 222 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 232 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 198 of file Connection.py.

+ Here is the call graph for this function:

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