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

Public Member Functions

def __init__ (self, connection, AuthResult auth_result, pool, retry_connect=True)
 
def execute_parameter (self, stmt, params)
 
def execute (self, stmt)
 
def execute_json (self, stmt)
 
def execute_json_with_parameter (self, stmt, params)
 
def release (self)
 
def ping (self)
 
def ping_session (self)
 
def __del__ (self)
 

Detailed Description

Definition at line 20 of file Session.py.

Member Function Documentation

◆ execute()

def execute (   self,
  stmt 
)
execute statement

:param stmt: the ngql
:return: ResultSet

Definition at line 71 of file Session.py.

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

◆ execute_json()

def execute_json (   self,
  stmt 
)
execute statement and return the result as a JSON string
    Date and Datetime will be returned in UTC
    JSON struct:
    {
        "results": [
        {
            "columns": [],
            "data": [
            {
                "row": [
                "row-data"
                ],
                "meta": [
                "metadata"
                ]
            }
            ],
            "latencyInUs": 0,
            "spaceName": "",
            "planDesc ": {
            "planNodeDescs": [
                {
                "name": "",
                "id": 0,
                "outputVar": "",
                "description": {
                    "key": ""
                },
                "profiles": [
                    {
                    "rows": 1,
                    "execDurationInUs": 0,
                    "totalDurationInUs": 0,
                    "otherStats": {}
                    }
                ],
                "branchInfo": {
                    "isDoBranch": false,
                    "conditionNodeId": -1
                },
                "dependencies": []
                }
            ],
            "nodeIndexMap": {},
            "format": "",
            "optimize_time_in_us": 0
            },
            "comment ": ""
        }
        ],
        "errors": [
        {
            "code": 0,
            "message": ""
        }
        ]
    }
:param stmt: the ngql
:return: JSON string

Definition at line 79 of file Session.py.

+ Here is the call graph for this function:

◆ execute_json_with_parameter()

def execute_json_with_parameter (   self,
  stmt,
  params 
)
execute statement and return the result as a JSON string
    Date and Datetime will be returned in UTC
    JSON struct:
    {
        "results": [
        {
            "columns": [],
            "data": [
            {
                "row": [
                "row-data"
                ],
                "meta": [
                "metadata"
                ]
            }
            ],
            "latencyInUs": 0,
            "spaceName": "",
            "planDesc ": {
            "planNodeDescs": [
                {
                "name": "",
                "id": 0,
                "outputVar": "",
                "description": {
                    "key": ""
                },
                "profiles": [
                    {
                    "rows": 1,
                    "execDurationInUs": 0,
                    "totalDurationInUs": 0,
                    "otherStats": {}
                    }
                ],
                "branchInfo": {
                    "isDoBranch": false,
                    "conditionNodeId": -1
                },
                "dependencies": []
                }
            ],
            "nodeIndexMap": {},
            "format": "",
            "optimize_time_in_us": 0
            },
            "comment ": ""
        }
        ],
        "errors": [
        {
            "code": 0,
            "message": ""
        }
        ]
    }
:param stmt: the ngql
:param params: parameter map
:return: JSON string

Definition at line 142 of file Session.py.

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

◆ execute_parameter()

def execute_parameter (   self,
  stmt,
  params 
)
execute statement
:param stmt: the ngql
:param params: parameter map
:return: ResultSet

Definition at line 32 of file Session.py.

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

◆ ping()

def ping (   self)
ping at connection level check the connection is valid

:return: True or False

Definition at line 239 of file Session.py.

+ Here is the caller graph for this function:

◆ ping_session()

def ping_session (   self)
ping at session level, check whether the session is usable

Definition at line 248 of file Session.py.

+ Here is the call graph for this function:

◆ release()

def release (   self)
release the connection to pool, and the session couldn't been use again

:return:

Definition at line 228 of file Session.py.

+ Here is the caller graph for this function:

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