groovy.sql

## Class Sql.PreparedQueryCommand

- java.lang.Object
- - groovy.sql.Sql.AbstractQueryCommand
  - - groovy.sql.Sql.PreparedQueryCommand

- Enclosing class:
    Sql

      protected final class Sql.PreparedQueryCommand
      extends Sql.AbstractQueryCommand

- - ### Field Summary

    - ### Fields inherited from class groovy.sql.Sql.AbstractQueryCommand

      `sql, statement`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ResultSet` | `runQuery(Connection connection)` Perform the query.

    - ### Methods inherited from class groovy.sql.Sql.AbstractQueryCommand

      `closeResources, closeResources`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### runQuery

          protected ResultSet runQuery(Connection connection)
                                throws SQLException

      Description copied from class: `Sql.AbstractQueryCommand`
      Perform the query. Must set statement field so that the main (`Sql.AbstractQueryCommand.execute()`) method can clean up. This is the method that encloses the variant part of the code.
      Specified by:
        `runQuery` in class `Sql.AbstractQueryCommand`
      Parameters:
        `connection` - the connection to use
      Returns:
        ResultSet from an executeQuery method.
      Throws:
        `SQLException` - if a database error occurs