Improved docs for cpl.database
This commit is contained in:
parent
e562c31033
commit
9026f021ed
@ -10,12 +10,14 @@ from cpl.database.database_settings import DatabaseSettings
|
|||||||
|
|
||||||
|
|
||||||
class DatabaseConnection(DatabaseConnectionABC):
|
class DatabaseConnection(DatabaseConnectionABC):
|
||||||
|
r"""Representation of the database connection
|
||||||
|
|
||||||
|
Parameter
|
||||||
|
---------
|
||||||
|
database_settings: :class:`cpl.database.database_settings.DatabaseSettings`
|
||||||
|
"""
|
||||||
|
|
||||||
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
|
||||||
|
@ -5,6 +5,7 @@ from sqlalchemy.orm import Session
|
|||||||
|
|
||||||
|
|
||||||
class DatabaseConnectionABC(ABC):
|
class DatabaseConnectionABC(ABC):
|
||||||
|
r"""ABC for the :class:`cpl.database.connection.database_connection.DatabaseConnection`"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self): pass
|
def __init__(self): pass
|
||||||
|
@ -11,6 +11,12 @@ from cpl.database.database_model import DatabaseModel
|
|||||||
|
|
||||||
|
|
||||||
class DatabaseContext(DatabaseContextABC):
|
class DatabaseContext(DatabaseContextABC):
|
||||||
|
r"""Representation of the database context
|
||||||
|
|
||||||
|
Parameter
|
||||||
|
---------
|
||||||
|
database_settings: :class:`cpl.database.database_settings.DatabaseSettings`
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, database_settings: DatabaseSettings):
|
def __init__(self, database_settings: DatabaseSettings):
|
||||||
DatabaseContextABC.__init__(self)
|
DatabaseContextABC.__init__(self)
|
||||||
|
@ -5,6 +5,7 @@ from sqlalchemy.orm import Session
|
|||||||
|
|
||||||
|
|
||||||
class DatabaseContextABC(ABC):
|
class DatabaseContextABC(ABC):
|
||||||
|
r"""ABC for the :class:`cpl.database.context.database_context.DatabaseContext`"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
|
@ -8,6 +8,7 @@ from cpl.database.database_settings_name_enum import DatabaseSettingsNameEnum
|
|||||||
|
|
||||||
|
|
||||||
class DatabaseSettings(ConfigurationModelABC):
|
class DatabaseSettings(ConfigurationModelABC):
|
||||||
|
r"""Represents settings for the database connection"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
ConfigurationModelABC.__init__(self)
|
ConfigurationModelABC.__init__(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user