net.loadbang.sql
Interface Database.ConnectionCallback<T>
- Type Parameters:
T - the type of object to be returned by any query in the callback
(we use Object, and return null, for update callbacks)
- Enclosing class:
- Database
public static interface Database.ConnectionCallback<T>
An inner interface for connection callbacks.
|
Method Summary |
T |
go(java.sql.Connection conn)
Run a query or update operation, given a database connection. |
go
T go(java.sql.Connection conn)
throws OperationException
- Run a query or update operation, given a database connection.
- Parameters:
conn - the database connection
- Returns:
- the result of a query (return null if the operation was an update)
- Throws:
OperationException - (wrapped round some other exception) if there
is a problem within the body of the callback