mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 22:45:44 +00:00
Added run() method to TarantoolDBConnection Class.
This commit is contained in:
parent
79f4dd4c7e
commit
f1e4e386b6
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user