Skip to content

Commit c741a41

Browse files
committed
QueryDetails null handling
1 parent 8f96e52 commit c741a41

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/src/main/java/me/zort/sqllib/internal/query/QueryDetails.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public void accept(int value) {
101101
}
102102

103103
private static void set(PreparedStatement statement, int index, Object value) throws SQLException {
104-
switch(value.getClass().getSimpleName().toLowerCase()) {
104+
String type = value != null ? value.getClass().getSimpleName().toLowerCase() : "null";
105+
switch(type) {
105106
case "string":
106107
statement.setString(index, (String) value);
107108
break;

0 commit comments

Comments
 (0)