Practice ยท 1 of 1
Task Repository
Implement TaskRepository(conn) with methods: add(title) -> int (insert, return id), get(task_id) -> dict | None ({id, title, done}), complete(task_id) -> bool (mark done, True if a row changed), and all() -> list[dict] ordered by id. All SQL parameterized.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Repository Drills