public interface ConnectionProvider
Modifier and Type | Method and Description |
---|---|
void |
execute(SqlCallback callback)
Executes SQL statements as defined in the callback function.
|
<T> T |
executeQuery(QueryCallback<T> callback)
Executes SQL statements as defined in the callback function and returns the results.
|
<T> T executeQuery(@Nonnull QueryCallback<T> callback)
This method is mostly useful for running SELECT statements and returning the given results in some form. Executes SQL statements as defined in the callback function and manages transaction semantics.
Transaction semantics for this method will depend on how you aquired the ConnectionProvider - see appropriate
javadoc there eg QueryDslAccessor.withNewConnection()
.
T
- type of resultscallback
- the callback function that runs the queryvoid execute(@Nonnull SqlCallback callback)
This method does not return results and is mostly useful for running INSERT, UPDATE, and DELETE operations.
Transaction semantics for this method will depend on how you aquired the ConnectionProvider - see appropriate
javadoc there eg QueryDslAccessor.withNewConnection()
.
callback
- the callback function that runs the queryCopyright © 2002-2019 Atlassian. All Rights Reserved.