Package io.micronaut.data.spring.jdbc
Class SpringJdbcConnectionOperations
java.lang.Object
io.micronaut.data.spring.jdbc.SpringJdbcConnectionOperations
- All Implemented Interfaces:
ConnectionOperations<Connection>
@Internal
@EachBean(javax.sql.DataSource.class)
@Replaces(DefaultDataSourceConnectionOperations.class)
public final class SpringJdbcConnectionOperations
extends Object
implements ConnectionOperations<Connection>
Spring JDBC connection operations.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
execute
(ConnectionDefinition definition, Function<ConnectionStatus<Connection>, R> callback) Execute a connection within the context of the function.Obtains the current connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.data.connection.ConnectionOperations
executeRead, executeWrite, getConnectionStatus
-
Constructor Details
-
SpringJdbcConnectionOperations
-
-
Method Details
-
findConnectionStatus
Description copied from interface:ConnectionOperations
Obtains the current connection.- Specified by:
findConnectionStatus
in interfaceConnectionOperations<Connection>
- Returns:
- The optional connection
-
execute
public <R> R execute(ConnectionDefinition definition, Function<ConnectionStatus<Connection>, R> callback) Description copied from interface:ConnectionOperations
Execute a connection within the context of the function.- Specified by:
execute
in interfaceConnectionOperations<Connection>
- Type Parameters:
R
- The result- Parameters:
definition
- The connection definitioncallback
- The call back- Returns:
- The result
-