code: public ResultSet executeQuery() throws SQLException {
          checkClosed();
  
          if (!this.query) {
              throw new SQLException("Not a query");
          } // end of if
  
          // ---
  
          final ArrayList<Parameter> params = 
              new ArrayList<Parameter>(this.parameters.values());
  
          final int idx = params.indexOf(null);
  
          if (idx != -1) {
              throw new SQLException("Missing parameter value: " + (idx+1));
          } // end of if
          
          // ---
  
          try {
              final QueryResult res = this.handler.whenSQLQuery(sql, params);
  
              // Not an update, so no update count or generated keys
              this.updateCount = -1;
              this.generatedKeys = EMPTY_GENERATED_KEYS.withStatement(this);
  
              this.warning = res.getWarning();
              
              return (this.result = res.getRowList().resultSet().
                  withStatement(this).withWarning(this.warning));
  
          } catch (SQLException se) {
              throw se;
          } catch (Exception e) {
              throw new SQLException(e.getMessage(), e);
          } // end of catch
      }
docs: {@inheritDoc}