Merge pull request #199 from kingaj12/patch-1

Update records.py
This commit is contained in:
2024-03-29 19:01:05 -04:00
committed by GitHub
+7 -1
View File
@@ -259,7 +259,13 @@ class Database(object):
# Create an engine.
self._engine = create_engine(self.db_url, **kwargs)
self.open = True
def get_engine(self):
# Return the engine if open
if not self.open:
raise exc.ResourceClosedError('Database closed.')
return self._engine
def close(self):
"""Closes the Database."""
self._engine.dispose()