public abstract class AbstractReactiveMybatisExecutor extends Object implements ReactiveMybatisExecutor
Concentrate on operation with connection
| Modifier and Type | Field and Description |
|---|---|
protected R2dbcMybatisConfiguration |
configuration
The Configuration.
|
protected io.r2dbc.spi.ConnectionFactory |
connectionFactory
The Connection factory.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReactiveMybatisExecutor(R2dbcMybatisConfiguration configuration,
io.r2dbc.spi.ConnectionFactory connectionFactory)
Instantiates a new Abstract reactive mybatis executor.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
close(boolean forceRollback)
close session
|
protected reactor.core.publisher.Mono<Void> |
closeConnection(io.r2dbc.spi.Connection connection)
Release the
Connection. |
reactor.core.publisher.Mono<Void> |
commit(boolean required)
commit transaction
|
protected abstract <E> reactor.core.publisher.Flux<E> |
doQueryWithConnection(io.r2dbc.spi.Connection connection,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter,
org.apache.ibatis.session.RowBounds rowBounds)
do query with connection actually
|
protected abstract reactor.core.publisher.Mono<Integer> |
doUpdateWithConnection(io.r2dbc.spi.Connection connection,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter)
do update with connection actually
|
protected <T> reactor.core.publisher.Mono<T> |
inConnection(io.r2dbc.spi.ConnectionFactory connectionFactory,
Function<io.r2dbc.spi.Connection,reactor.core.publisher.Mono<T>> action)
in connection
|
protected <T> reactor.core.publisher.Flux<T> |
inConnectionMany(io.r2dbc.spi.ConnectionFactory connectionFactory,
Function<io.r2dbc.spi.Connection,reactor.core.publisher.Flux<T>> action)
in connection many
|
<E> reactor.core.publisher.Flux<E> |
query(org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter,
org.apache.ibatis.session.RowBounds rowBounds)
execute query
|
reactor.core.publisher.Mono<Void> |
rollback(boolean required)
rollback transaction
|
reactor.core.publisher.Mono<Integer> |
update(org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter)
execute update
|
protected final R2dbcMybatisConfiguration configuration
protected final io.r2dbc.spi.ConnectionFactory connectionFactory
protected AbstractReactiveMybatisExecutor(R2dbcMybatisConfiguration configuration, io.r2dbc.spi.ConnectionFactory connectionFactory)
configuration - the configurationconnectionFactory - the connection factorypublic reactor.core.publisher.Mono<Integer> update(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameter)
ReactiveMybatisExecutorupdate in interface ReactiveMybatisExecutormappedStatement - the mapped statementparameter - the parameterpublic <E> reactor.core.publisher.Flux<E> query(org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter,
org.apache.ibatis.session.RowBounds rowBounds)
ReactiveMybatisExecutorquery in interface ReactiveMybatisExecutorE - the type parametermappedStatement - the mapped statementparameter - the parameterrowBounds - the row boundspublic reactor.core.publisher.Mono<Void> commit(boolean required)
ReactiveMybatisExecutorcommit in interface ReactiveMybatisExecutorrequired - the requiredpublic reactor.core.publisher.Mono<Void> rollback(boolean required)
ReactiveMybatisExecutorrollback in interface ReactiveMybatisExecutorrequired - the requiredpublic reactor.core.publisher.Mono<Void> close(boolean forceRollback)
ReactiveMybatisExecutorclose in interface ReactiveMybatisExecutorforceRollback - the force rollbackprotected abstract reactor.core.publisher.Mono<Integer> doUpdateWithConnection(io.r2dbc.spi.Connection connection, org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameter)
connection - the connectionmappedStatement - the mapped statementparameter - the parameterprotected abstract <E> reactor.core.publisher.Flux<E> doQueryWithConnection(io.r2dbc.spi.Connection connection,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameter,
org.apache.ibatis.session.RowBounds rowBounds)
E - the type parameterconnection - the connectionmappedStatement - the mapped statementparameter - the parameterrowBounds - the row boundsprotected <T> reactor.core.publisher.Mono<T> inConnection(io.r2dbc.spi.ConnectionFactory connectionFactory,
Function<io.r2dbc.spi.Connection,reactor.core.publisher.Mono<T>> action)
T - the type parameterconnectionFactory - the connection factoryaction - the actionprotected <T> reactor.core.publisher.Flux<T> inConnectionMany(io.r2dbc.spi.ConnectionFactory connectionFactory,
Function<io.r2dbc.spi.Connection,reactor.core.publisher.Flux<T>> action)
T - the type parameterconnectionFactory - the connection factoryaction - the actionprotected reactor.core.publisher.Mono<Void> closeConnection(io.r2dbc.spi.Connection connection)
Connection.connection - the connectionCopyright © 2022. All rights reserved.