Skip to content

Commit

Permalink
do line less than 100 character
Browse files Browse the repository at this point in the history
  • Loading branch information
romazan07 committed Jun 24, 2024
1 parent 699105f commit 1dc44fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mate/academy/dao/BookDaoImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public Book create(Book book) {
String query = "INSERT INTO books (title, price) VALUES (?, ?)";
try (
Connection connection = ConnectionUtil.getConnection();
PreparedStatement statement = connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS)) {
PreparedStatement statement =
connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS)) {
statement.setString(1, book.getTitle());
statement.setDouble(2, book.getPrice());
int affectedRows = statement.executeUpdate();
Expand Down

0 comments on commit 1dc44fb

Please sign in to comment.