Executes a SQL query as a prepared statement, setting its fields to the elements of the vararg passed @param command The SQL command to execute @param fields A vararg of the fields to set in the prepared statement @return The number of updated rows @author U9G
(String command, Object... fields)
| 214 | * @author U9G |
| 215 | */ |
| 216 | public int executeUpdate(String command, Object... fields) { |
| 217 | int updatedRows = 0; |
| 218 | try { |
| 219 | PreparedStatement statement = prepareStatement(command, fields); |
| 220 | updatedRows = statement.executeUpdate(); |
| 221 | statement.close(); |
| 222 | } catch (SQLException e) { |
| 223 | sneakyThrow(e); |
| 224 | } |
| 225 | return updatedRows; |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Executes a SQL query as a prepared statement, setting its fields to the elements of the vararg passed, |
no test coverage detected