Skip to content

Commit

Permalink
fix another crash
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Jul 21, 2024
1 parent 82207c1 commit d88f51c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/me/mrnavastar/sqlib/impl/SQLConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public List<Integer> listIds(DataStore store) {
public <T> T readField(DataStore store, int id, String field, Class<T> clazz) {
try (Handle h = sql.open()) {
return h.select("SELECT _%s FROM %s WHERE SQLIB_AUTO_ID = ?".formatted(field, store.toString()), id).mapTo(clazz).one();
} catch (Exception ignore) {
return null;
}
}

Expand Down

0 comments on commit d88f51c

Please sign in to comment.