code: protected final ResultSet executeQuery(String sql) throws SQLException {
          AbstractQueryCommand command = createQueryCommand(sql);
          ResultSet rs = null;
          try {
              rs = command.execute();
          } finally {
              command.closeResources();
          }
          return rs;
      }
docs: Useful helper method which handles resource management when executing a
  query which returns a result set.
  Derived classes of Sql can override "createQueryCommand" and then call
  this method to access the ResultSet returned from the provided query
  or alternatively can use the higher-level method of Sql which return
  result sets which are funnelled through this method, e.g. eachRow, query.
  
  @param sql query to execute
  @return the resulting ResultSet
  @throws SQLException if a database error occurs