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

Method queryResults

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

Executes a SQL query as a prepared statement, setting its fields to the elements of the vararg passed. Returns a Results, which wraps a ResultSet for easier use @param query The SQL query to execute @param fields A vararg of the fields to set in the prepared statement @return The r

(String query, Object... fields)

Source from the content-addressed store, hash-verified

390 * @return The results of the query
391 */
392 public Results queryResults(String query, Object... fields) {
393 try {
394 PreparedStatement statement = prepareStatement(query, fields);
395 ResultSet results = statement.executeQuery();
396 return new Results(results, statement);
397 } catch (SQLException e) {
398 sneakyThrow(e);
399 return null;
400 }
401 }
402
403 /**
404 * @return The Connection this SQLHelper wraps

Callers 2

attemptMigrationMethod · 0.80
loadAllMethod · 0.80

Calls 2

prepareStatementMethod · 0.95
sneakyThrowMethod · 0.95

Tested by

no test coverage detected