MCPcopy Create free account
hub / github.com/boxbeam/RedLib / executeUpdate

Method executeUpdate

src/redempt/redlib/sql/SQLHelper.java:216–226  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers 4

SQLiteBackendMethod · 0.80
attemptMigrationMethod · 0.80
saveMethod · 0.80
removeMethod · 0.80

Calls 3

prepareStatementMethod · 0.95
sneakyThrowMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected