Skip to content

Implement update method in MySQLDAO and editById in TaskResource to update tasks in the database#34

Merged
pedr0limpio merged 1 commit intomainfrom
4-implement-the-editbyidint-id-task-taskfor-method-to-update-a-task
Jun 27, 2025
Merged

Implement update method in MySQLDAO and editById in TaskResource to update tasks in the database#34
pedr0limpio merged 1 commit intomainfrom
4-implement-the-editbyidint-id-task-taskfor-method-to-update-a-task

Conversation

@silrenan
Copy link
Copy Markdown
Collaborator

@silrenan silrenan commented Jun 2, 2025

  • Implemented the editById(int id, Task task) method to update tasks by ID.
  • Added full update logic in MySQLDAO including updating main fields and tags, with transaction handling and rollback on failure.
  • Implemented getById(int id) in MySQLDAO to fetch a task and its tags from the database.
  • Added/updated unit tests in TaskResourceTest to cover:
    • Creating a new task.
    • Fetching by ID (success, not found, and exception cases).
    • Editing a task by ID and verifying DAO interaction.
    • Improved error handling and logging for database operations.
  • Ensured all new and existing tests pass.
  • Closes Implement the editById(int id, Task taskFor) method to update a task #4.
  • Builds and passes tests.
  • Updates database via insomnia.

@silrenan silrenan requested a review from pedr0limpio June 2, 2025 13:16
@silrenan silrenan linked an issue Jun 2, 2025 that may be closed by this pull request
@silrenan silrenan self-assigned this Jun 2, 2025
@silrenan silrenan added the enhancement New feature or request label Jun 2, 2025
@silrenan silrenan force-pushed the 4-implement-the-editbyidint-id-task-taskfor-method-to-update-a-task branch from 5934cd8 to 00b48d3 Compare June 4, 2025 13:36
…pdate tasks in the database

Signed-off-by: silrenan <75952546+silrenan@users.noreply.github.com>renan <75952546+silrenan@users.noreply.github.com>
Signed-off-by: sirenan <75952546+silrenan@users.noreply.github.com>
@pedr0limpio pedr0limpio force-pushed the 4-implement-the-editbyidint-id-task-taskfor-method-to-update-a-task branch from 00b48d3 to 95c09a6 Compare June 27, 2025 21:14
@pedr0limpio pedr0limpio merged commit 0b8230a into main Jun 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the editById(int id, Task taskFor) method to update a task

2 participants