diff --git a/src/main/java/me/mrnavastar/sqlib/impl/SQLConnection.java b/src/main/java/me/mrnavastar/sqlib/impl/SQLConnection.java index 5ae6785..d677364 100644 --- a/src/main/java/me/mrnavastar/sqlib/impl/SQLConnection.java +++ b/src/main/java/me/mrnavastar/sqlib/impl/SQLConnection.java @@ -64,7 +64,7 @@ public void deleteRow(DataStore store, int id) { public boolean rowExists(DataStore store, int id) { try (Handle h = sql.open()) { - return h.select("SELECT 1 FROM %s WHERE SQLIB_AUTO_ID = ?".formatted(store.toString()), id).mapTo(Integer.class).one() != null; + return h.select("SELECT 1 FROM %s WHERE SQLIB_AUTO_ID = ?".formatted(store.toString()), id).mapTo(Integer.class).findFirst().isPresent(); } }