mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 18:55:03 +00:00
Enforce schema matching
Ensure all Lambdas and tests follow the current db schema
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.HashMap;
|
||||
@@ -25,7 +26,7 @@ public class ListEntryAdder implements CallHandler {
|
||||
statement.setInt(1, (Integer) bodyMap.get("productID"));
|
||||
statement.setInt(2, (Integer) bodyMap.get("listID"));
|
||||
statement.setInt(3, (Integer) bodyMap.get("quantity"));
|
||||
statement.setObject(4, Instant.now().atZone(ZoneOffset.UTC).toLocalDateTime());
|
||||
statement.setTimestamp(4, Timestamp.from(Instant.now()));
|
||||
statement.setBoolean(5, (Boolean) bodyMap.get("purchased"));
|
||||
System.out.println(statement);
|
||||
statement.executeUpdate();
|
||||
|
||||
Reference in New Issue
Block a user