cpl_core.database.context

cpl_core.database.context.database_context

class cpl_core.database.context.database_context.DatabaseContext

Bases: cpl_core.database.context.database_context_abc.DatabaseContextABC

Representation of the database context

connect(database_settings: cpl_core.database.database_settings.DatabaseSettings)

Connects to a database by connection settings

property cursor
save_changes()

Saves changes of the database

select(statement: str)list

Runs SQL Statements

statement: str

list: Fetched list of selected elements

cpl_core.database.context.database_context_abc

class cpl_core.database.context.database_context_abc.DatabaseContextABC(*args)

Bases: abc.ABC

ABC for the cpl_core.database.context.database_context.DatabaseContext

abstract connect(database_settings: cpl_core.database.database_settings.DatabaseSettings)

Connects to a database by connection settings

property cursor
abstract save_changes()

Saves changes of the database

abstract select(statement: str)list

Runs SQL Statements

statement: str

list: Fetched list of selected elements