NebulaGraph Python Client
release-3.4
|
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) |
Definition at line 20 of file Session.py.
def execute | ( | self, | |
stmt | |||
) |
execute statement :param stmt: the ngql :return: ResultSet
Definition at line 71 of file Session.py.
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.
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.
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.
def ping | ( | self | ) |
ping at connection level check the connection is valid :return: True or False
Definition at line 239 of file Session.py.
def ping_session | ( | self | ) |
ping at session level, check whether the session is usable
Definition at line 248 of file Session.py.
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.