colda.database.strategy package
Submodules
colda.database.strategy.abstract_database_strategy module
colda.database.strategy.api module
- class colda.database.strategy.api.DatabaseOperator
Bases:
AbstractDatabaseStrategy
,BaseDatabaseStrategy
Strategy pattern to manage db
Attributes
database
Methods
set_database get_all_records_history store_record get_record
- get_all_records_history(**kwargs) list
call specific function
Parameters
**kwargs : Any
Returns
list
- classmethod get_instance() DatabaseOperator
Singleton pattern. Get instance of current class.
Returns
DatabaseOperator
- set_database(database_type: Literal['default_metadata', 'train_sponsor_metadata', 'train_assistor_metadata', 'train_algorithm'] | Literal['default_metadatatest_sponsor_metadata', 'test_assistor_metadata', 'test_algorithm']) None
Helper function to set strategy object
Parameters
database_type : Union[Train_Database_Type, Test_Database_Type]
Returns
None
colda.database.strategy.base module
colda.database.strategy.database_strategy module
- class colda.database.strategy.database_strategy.DatabaseOperator
Bases:
AbstractDatabaseStrategy
,BaseDatabaseStrategy
Strategy pattern to manage db
Attributes
database
Methods
set_database get_all_records_history store_record get_record
- get_all_records_history(**kwargs) list
call specific function
Parameters
**kwargs : Any
Returns
list
- classmethod get_instance() DatabaseOperator
Singleton pattern. Get instance of current class.
Returns
DatabaseOperator
- set_database(database_type: Literal['default_metadata', 'train_sponsor_metadata', 'train_assistor_metadata', 'train_algorithm'] | Literal['default_metadatatest_sponsor_metadata', 'test_assistor_metadata', 'test_algorithm']) None
Helper function to set strategy object
Parameters
database_type : Union[Train_Database_Type, Test_Database_Type]
Returns
None