Improved comments of database

This commit is contained in:
Sven Heidemann 2021-03-14 16:28:23 +01:00
parent 51cec3062d
commit 094a3c2aa9
2 changed files with 11 additions and 1 deletions

View File

@ -12,6 +12,10 @@ from cpl.database.database_settings import DatabaseSettings
class DatabaseConnection(DatabaseConnectionABC): class DatabaseConnection(DatabaseConnectionABC):
def __init__(self, database_settings: DatabaseSettings): def __init__(self, database_settings: DatabaseSettings):
"""
Represents an connection to a database
:param database_settings:
"""
DatabaseConnectionABC.__init__(self) DatabaseConnectionABC.__init__(self)
self._db_settings = database_settings self._db_settings = database_settings

View File

@ -18,4 +18,10 @@ class DatabaseConnectionABC(ABC):
def session(self) -> Session: pass def session(self) -> Session: pass
@abstractmethod @abstractmethod
def connect(self, connection_string: str): pass def connect(self, connection_string: str):
"""
Connects to a database by connection string
:param connection_string:
:return:
"""
pass