Application.database#
Attributes#
Exceptions#
Common base class for all non-exit exceptions. |
Classes#
Allows database connections to be reused |
Functions#
|
|
|
Verifies that the csv file is a messand returns which datatype of each column |
|
Populates the database with values from a csv file. |
|
Returns the file name skeleton which can be formated with the roll number. This |
|
Returns the file name skeleton which can be formated with the roll number. This |
Basically only used to rename files in the event of a fuckup |
|
|
|
|
|
|
|
|
Module Contents#
- Application.database.logger#
- exception Application.database.GarbageMessListError[source]#
Bases:
ExceptionCommon base class for all non-exit exceptions.
- class Application.database.ConnectionPool[source]#
Allows database connections to be reused
- Attributes:
_q: A queue.SimpleQueue that stores the connections
- _q#
- __enter__() sqlite3.Connection[source]#
Gets a connections from ConnectionPool._q, creates a new connection if the queue is empty.
Returns:
sqlite3.Connection
- Application.database.scan_mess_list(path: pathlib.Path) list[dict[str, str]][source]#
Verifies that the csv file is a messand returns which datatype of each column
- Application.database.read_mess_list(path: pathlib.Path)[source]#
Populates the database with values from a csv file.
- Args:
path: Path to the csv file
- Application.database.get_file_name(id)[source]#
Returns the file name skeleton which can be formated with the roll number. This if the name of the output of the billing process.
- Args:
id (): The complete ID of the person who’s image is being saved.
- Returns:
str of the form “hoscode_roomno_{}_YEARLAST4DIGITS”
- Application.database.get_all_info(id)[source]#
Returns the file name skeleton which can be formated with the roll number. This if the name of the output of the billing process.
- Args:
id (): The complete ID of the person who’s image is being saved.
- Returns:
str of the form “hoscode_roomno_{}_YEARLAST4DIGITS”