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
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Rexecute(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, waitMethods inherited from interface io.micronaut.data.connection.ConnectionOperations
executeRead, executeWrite, getConnectionStatus
-
Constructor Details
-
SpringJdbcConnectionOperations
-
-
Method Details
-
findConnectionStatus
Description copied from interface:ConnectionOperationsObtains the current connection.- Specified by:
findConnectionStatusin interfaceConnectionOperations<Connection>- Returns:
- The optional connection
-
execute
public <R> R execute(ConnectionDefinition definition, Function<ConnectionStatus<Connection>, R> callback) Description copied from interface:ConnectionOperationsExecute a connection within the context of the function.- Specified by:
executein interfaceConnectionOperations<Connection>- Type Parameters:
R- The result- Parameters:
definition- The connection definitioncallback- The call back- Returns:
- The result
-