constant module

Generic constants and messages.

bh_database.constant.BH_UNSUPPORTED_DATABASE_MSG = '{!r} unsupported database.'

Support only two database types: MySQL and PostgreSQL. See Core module.

bh_database.constant.BH_REC_STATUS_FIELDNAME = 'recStatus'

Write-pending records’ status. See write_to_database(self, data: list) -> ResultStatus .

bh_database.constant.BH_RECORD_STATUS_NEW = 'new'

Write-pending new records – these records are to be inserted. See write_to_database(self, data: list) -> ResultStatus .

bh_database.constant.BH_RECORD_STATUS_MODIFIED = 'modified'

Write-pending modified records – these records are to be updated. See write_to_database(self, data: list) -> ResultStatus .

bh_database.constant.BH_RECORD_STATUS_UNCHANGED = 'unchanged'

Write-pending unchanged records. Not used.

bh_database.constant.BH_NEXT_ID_NO_RESULT_MSG = 'Get next Id for {0}.{1} failed to get next value.'

Failed to get a next unique integer value for a (primary key) column.

bh_database.constant.BH_STORED_PROC_NO_RESULT_SET_MSG = 'Stored proc {}(...) appears to return no resultset.'

A stored procedure returns no data based on input parameters. See run_stored_proc(self, stored_proc_name: str, params: list, auto_session=False) -> dict: .

bh_database.constant.BH_SQL_NO_DATA_MSG = 'No data for the selection criteria.'

A full text SELECT SQL statement returns no data. See run_select_sql(self, sql: str, auto_session=False) -> dict:.

bh_database.constant.BH_RETRIEVED_SUCCESSFUL_MSG = 'Data has been retrieved successfully.'

A full text SELECT SQL statement returns some data. See run_select_sql(self, sql: str, auto_session=False) -> dict:.

bh_database.constant.BH_SAVED_SUCCESSFUL_MSG = 'Data has been saved successfully.'

Pending data have been successfully written to the database. See write_to_database(self, data: list) -> ResultStatus .