* Return a list of all of the data in the table that matches the {@link PreparedStmt}. Should be used carefully if
* the table is large. Consider using the {@link Dao#iterator} if this is the case.
*/
public RawResults queryForAllRawOld(ConnectionSource connectionSource, String query) throws SQLException {
DatabaseConnection connection = connectionSource.getReadOnlyConnection();
CompiledStatement compiledStatement = null;
try {
compiledStatement = connection.compileStatement(query, StatementType.SELECT, noFieldTypes);
String[] columnNames = extractColumnNames(compiledStatement);
RawResultsWrapper rawResults =
new RawResultsWrapper(connectionSource, connection, query, compiledStatement, columnNames, this);
compiledStatement = null;
connection = null;
return rawResults;
} finally {
if (compiledStatement != null) {
compiledStatement.close();
}
if (connection != null) {
connectionSource.releaseConnection(connection);
}
}