-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
commit #6
base: main
Are you sure you want to change the base?
commit #6
Conversation
book.setId(id); | ||
} | ||
} catch (SQLException e) { | ||
throw new RuntimeException("Can't add book to db ", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
@Override | ||
public Optional<Book> findById(Long id) { | ||
String query = "SELECT id, title, price " + "FROM books WHERE id = ?;"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String query = "SELECT id, title, price " + "FROM books WHERE id = ?;"; | |
String query = "SELECT id, title, price FROM books WHERE id = ?;"; |
@Override | ||
public boolean deleteById (Long id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Override | |
public boolean deleteById (Long id) { | |
@Override | |
public boolean deleteById (Long id) { |
@Override | ||
public Book update (Book book) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Override | |
public Book update (Book book) { | |
@Override | |
public Book update (Book book) { |
No description provided.