Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.sql
[Java] Class Sql.AbstractQueryCommand

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

    protected abstract class Sql.AbstractQueryCommand

Field Summary
`protected String` | `sql`
`protected Statement` | `statement`

Method Summary
`void` | `closeResources()` After performing the execute operation and making use of its return, it's necessary to free the resources allocated for the statement.
`void` | `closeResources(ResultSet rs)` After performing the execute operation and making use of its return, it's necessary to free the resources allocated for the statement.
`protected ResultSet` | `runQuery(Connection connection)` Perform the query.

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### sql

    protected final String sql

### statement

    protected Statement statement

Method Detail

### closeResources

    public final void closeResources()

  After performing the execute operation and making use of its return, it's necessary to free the resources allocated for the statement.

### closeResources

    public final void closeResources(ResultSet rs)

  After performing the execute operation and making use of its return, it's necessary to free the resources allocated for the statement.
  Parameters:
    `rs` - allows the caller to conveniently close its resource as well

### runQuery

    protected ResultSet runQuery(Connection connection)

  Perform the query. Must set statement field so that the main (execute()) method can clean up. This is the method that encloses the variant part of the code.
  throws:
    SQLException if a database error occurs
  Parameters:
    `connection` - the connection to use
  Returns:
    ResultSet from an executeQuery method.

Copyright © 2003-2010 The Codehaus. All rights reserved.