[WIP] Added native mysql support
This commit is contained in:
@@ -40,7 +40,7 @@ class ServiceCollection(ServiceCollectionABC):
|
||||
|
||||
def add_db_context(self, db_context_type: Type[DatabaseContextABC], db_settings: DatabaseSettings):
|
||||
self._database_context = db_context_type(db_settings)
|
||||
self._database_context.connect(CredentialManager.build_string(db_settings.connection_string, db_settings.credentials))
|
||||
self._database_context.connect(db_settings)
|
||||
|
||||
def add_logging(self):
|
||||
self.add_singleton(LoggerABC, Logger)
|
||||
|
@@ -15,15 +15,13 @@ class ServiceCollectionABC(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_db_context(self, db_context: Type[DatabaseContextABC], db_settings: DatabaseSettings):
|
||||
def add_db_context(self, db_context: Type[DatabaseContextABC]):
|
||||
r"""Adds database context
|
||||
|
||||
Parameter
|
||||
---------
|
||||
db_context: Type[:class:`cpl_core.database.context.database_context_abc.DatabaseContextABC`]
|
||||
Database context
|
||||
db_settings: :class:`cpl_core.database.database_settings.DatabaseSettings`
|
||||
Database settings
|
||||
"""
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user