DirectReport.database package
Submodules
DirectReport.database.blocker_storage module
- class DirectReport.database.blocker_storage.BlockerDataStore(db_path, conn=None)[source]
Bases:
object
- add_blocker_entry(blocker, associated_entry_uuid_str, uuid_str=None)[source]
Adds a new blocker entry to the blockers_uuid_table.
- Parameters:
blocker – The blocker entry.
associated_entry_uuid_str – The associated entry UUID as a string.
uuid_str – The UUID of the blocker entry as a string (optional).
- Returns:
None
DirectReport.database.daily_storage module
- class DirectReport.database.daily_storage.DailyUUIDTable(db_path, conn=None)[source]
Bases:
object
A class to interact with SQLite database for managing daily date-UUID mappings.
- add_uuid(date, week_uuid_str, uuid_str=None)[source]
Adds a UUID for the specified date to the SQLite database.
- Parameters:
date – The date to associate with the UUID.
week_uuid_str – The week UUID string.
uuid_str – The day UUID string (optional). If not provided, a new UUID will be generated.
- create_table()[source]
Creates the day_uuid_table table in the SQLite database if it doesn’t exist.
- delete_entry_by_date(date)[source]
Deletes the date-UUID mapping associated with the specified date.
- Parameters:
date – The date to delete the associated UUID for.
- find_uuid_by_date(date)[source]
Finds the UUID associated with the specified date.
- Parameters:
date – The date to find the associated UUID for.
- Returns:
The UUID string if found, otherwise None.
- get_uuid(date)[source]
Retrieves the UUID associated with the specified date.
- Parameters:
date – The date to get the associated UUID for.
- Returns:
The UUID string if found, otherwise None.
DirectReport.database.entry_storage module
- class DirectReport.database.entry_storage.EntryStorage(db_path, conn=None)[source]
Bases:
object
A class to interact with SQLite database for storing and retrieving Entry objects.
- add_entry(entry)[source]
Adds an Entry object to the SQLite database.
- Parameters:
entry – The Entry object to add.
- delete_entry(uuid)[source]
Deletes an Entry object from the SQLite database by its UUID.
- Parameters:
uuid – The UUID of the entry to delete.
- get_entries_by_week(week_uuid)[source]
Retrieves all entries for a given week.
- Parameters:
week_uuid – The UUID of the week for which to retrieve entries.
- Returns:
A list of dictionaries containing the entries’ data for the specified week.
- get_entry(uuid)[source]
Retrieves an Entry object from the SQLite database by its UUID.
- Parameters:
uuid – The UUID of the entry to retrieve.
- Returns:
The Entry object if found, otherwise None.
- get_uuid(date)[source]
Retrieves the UUID associated with the specified date.
- Parameters:
date – The date to get the associated UUID for.
- Returns:
The UUID string if found, otherwise None.
DirectReport.database.jira_storage module
- class DirectReport.database.jira_storage.JiraDataStore(db_path, conn=None)[source]
Bases:
object
- add_jira_entry(jira_tag, jira_entry, associated_entry_uuid_str, uuid_str=None)[source]
Adds a new Jira entry to the jiras_uuid_table.
- Parameters:
jira_tag – The Jira tag.
jira_entry – The Jira entry.
associated_entry_uuid_str – The associated entry UUID as a string.
uuid_str – The UUID of the Jira entry as a string (optional).
- Returns:
None
DirectReport.database.note_storage module
- class DirectReport.database.note_storage.NoteDataStore(db_path, conn=None)[source]
Bases:
object
- add_notes_entry(note_entry, associated_entry_uuid_str, uuid_str=None)[source]
Adds a new note entry to the note_uuid_table.
- Parameters:
note_entry – The note entry.
associated_entry_uuid_str – The associated entry UUID as a string.
uuid_str – The UUID of the note entry as a string (optional).
- Returns:
None
DirectReport.database.weekly_storage module
- class DirectReport.database.weekly_storage.WeekUUIDTable(db_path, conn=None)[source]
Bases:
object
A class to interact with SQLite database for managing date-UUID mappings.
- add_uuid(date, uuid_str=None)[source]
Adds a UUID for the specified date to the SQLite database.
- Parameters:
date – The date to associate with the UUID.
uuid_str – The UUID string (optional). If not provided, a new UUID will be generated.
- create_table()[source]
Creates the date_uuid_table table in the SQLite database if it doesn’t exist.
- delete_entry_by_date(date)[source]
Deletes the date-UUID mapping associated with the specified date.
- Parameters:
date – The date to delete the associated UUID for.
- find_uuid_by_date(date)[source]
Finds the UUID associated with the specified date.
- Parameters:
date – The date to find the associated UUID for.
- Returns:
The UUID string if found, otherwise None.
- get_uuid(date)[source]
Retrieves the UUID associated with the specified date.
- Parameters:
date – The date to get the associated UUID for.
- Returns:
The UUID string if found, otherwise None.
Module contents
Init file for database classes