Skip to main content

Practice · 1 of 1

Task Repository

CHALLENGE
Difficulty: intermediate+25 XP

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.

Back to lesson: Practice: Repository Drills