app.repository.task_params_repository module¶
- class app.repository.task_params_repository.TaskParamsRepository(session_factory, model=<class 'app.model.task_params.TasksParams'>)[source]¶
Bases:
BaseRepositoryRepository class for task parameters.
- Parameters:
session_factory (Callable[[...], AbstractAsyncContextManager[AsyncSession]])
- session_factory¶
Factory for creating SQLAlchemy sessions.
- Type:
Callable[…, AbstractAsyncContextManager[AsyncSession]]
- model¶
SQLAlchemy model class for task parameters.
- __init__(session_factory, model=<class 'app.model.task_params.TasksParams'>)[source]¶
- Initializes the TaskParamsRepository with the provided session factory
and model.
- Parameters:
session_factory (Callable[..., AbstractAsyncContextManager[AsyncSession]]) – The session factory.
model – The SQLAlchemy model class for task parameters.
- Return type:
None
- async patch_task_params_by_id(id, schema)[source]¶
Updates a task parameter row in place by its id.
Sibling of
GameParamsRepository.patch_game_params_by_id(), used by the task PATCH flow to rewrite a param’skey/valuewithout deleting and recreating the row (so its id is preserved).Raises
NotFoundErrorif the param does not exist.