Pavel T - #17
Pavel T#17pavel-tisner wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
📝 HackYourFuture auto gradeAssignment Score: 0 / 100 ✅Status: ✅ Passed Test Details |
rafaelhdr
left a comment
There was a problem hiding this comment.
Good job. Your code is well indented and easy to read.
Congratulations 👏
|
|
||
| -- **Question 6** — Add one book for the author you just inserted. It can be a real book or a made-up one. | ||
| INSERT INTO books (title, published_year, genre, author_id) | ||
| VALUES ('My way', 2026, 'Fiction', (SELECT id FROM authors WHERE last_name = 'Tisner')); |
There was a problem hiding this comment.
It is a very good solution. Here, I would recommend add more fields to the WHERE (not just the last name Tisner), to avoid get users with the same last name.
| -- **Question 7** — The genre for "The Dark Tower: The Gunslinger" was entered incorrectly as `'Fantasy'`. It should be `'Horror'`. Write an UPDATE to fix it, then verify the change with a SELECT. | ||
| UPDATE books | ||
| SET genre = 'Fantasy' | ||
| WHERE title = 'Harry Potter and the Deathly Hallows'; |
There was a problem hiding this comment.
The title is wrong here. It wasn't expected to be Harry Potter.
| const updatedCard = db | ||
| .prepare(`SELECT * FROM cards WHERE id = ?`) | ||
| .get(cardId); | ||
| updatedCard.learned = true |
There was a problem hiding this comment.
This line works, but it might make some confusion.
In all other methods, learned is an integer (0 or 1). This is the only case you are treating it as boolean.
It is fine for the exercise, but ideally it should always be the same (always integer 0 or 1, or always boolean false or true)
No description provided.