Added run() method to TarantoolDBConnection Class.

This commit is contained in:
andrei 2022-05-31 15:31:48 +03:00
parent 79f4dd4c7e
commit f1e4e386b6

View File

@ -54,6 +54,16 @@ class TarantoolDBConnection(Connection):
def space(self, space_name: str):
return self.query().space(space_name)
def run(self, query):
try:
return query.run(self.db_connect)
except tarantool.error.NetworkError:
return None
except tarantool.error.OperationalError as op_error:
raise op_error
except tarantool.error.SchemaError as schema_error:
raise schema_error
def get_connection(self):
return self.db_connect