History
Module to hold the history repository
- class HistoryRepository(manager, model=<class 'command_line_assistant.daemon.database.models.history.HistoryModel'>)[source]
Class that implements the history repository methods.
Default constructor for history repository.
- Parameters:
manager (DatabaseManager) – The database manager instance.
model (HistoryModel) – The SQLAlchemy model to use in the repository.
- delete_all(user_id)[source]
Method to remove all history from the database.
- Return type:
Note
This method will actually call
updateinternally to update thedeleted_atfield in the table.- Parameters:
user_id (Union[UUID, str]) – The unique identifier to query in the database.
- select_all_history(user_id)[source]
Select all history entries by user id.
- class InteractionRepository(manager, model=<class 'command_line_assistant.daemon.database.models.history.InteractionModel'>)[source]
Class that implements the interaction repository methods.
Default constructor for interaction repository.
- Parameters:
manager (DatabaseManager) – The database manager instance.
model (InteractionModel) – The SQLAlchemy model to use in the repository.