add null as allowed value in SQL statement
This commit is contained in:
parent
35a058abe0
commit
98819d6577
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
group = org.xbib
|
||||
name = database
|
||||
version = 1.4.1
|
||||
version = 1.4.2
|
||||
|
||||
org.gradle.warning.mode = ALL
|
||||
|
|
|
@ -485,8 +485,10 @@ public class DatabaseImpl implements Database {
|
|||
sql.argLocalDate(k, (LocalDate) v);
|
||||
} else if (v instanceof LocalDateTime) {
|
||||
sql.argLocalDateTime(k, (LocalDateTime) v);
|
||||
} else if (v == null) {
|
||||
sql.argNull(k);
|
||||
} else {
|
||||
throw new DatabaseException("unknown type for param: " + (v != null ? v.getClass() : "null"));
|
||||
throw new DatabaseException("unknown type for param: " + v.getClass());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -508,8 +510,10 @@ public class DatabaseImpl implements Database {
|
|||
sql.argLocalDate(k, (LocalDate) v);
|
||||
} else if (v instanceof LocalDateTime) {
|
||||
sql.argLocalDateTime(k, (LocalDateTime) v);
|
||||
} else if (v == null) {
|
||||
sql.argNull(k);
|
||||
} else {
|
||||
throw new DatabaseException("unknown type for param: " + (v != null ? v.getClass() : "null"));
|
||||
throw new DatabaseException("unknown type for param: " + v.getClass());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue