"UNION with CTE" Workaround
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2024-03-09 18:28:49 +01:00
Ursprung 647012ac40
Commit d5dbe05e29

Datei anzeigen

@ -134,7 +134,11 @@ public class Statement implements AutoCloseable {
public <T> T select(ResultSetUser<T> user, Object... objects) { public <T> T select(ResultSetUser<T> user, Object... objects) {
return withConnection(st -> { return withConnection(st -> {
ResultSet rs = st.executeQuery(); boolean res = st.execute();
if(!res) {
throw new SecurityException("No result set for select statement");
}
ResultSet rs = st.getResultSet();
T result = user.use(rs); T result = user.use(rs);
rs.close(); rs.close();
return result; return result;