public class DefaultReactiveSqlSession extends Object implements ReactiveSqlSession, MybatisReactiveContextManager
| Constructor and Description |
|---|
DefaultReactiveSqlSession(R2dbcMybatisConfiguration configuration,
ReactiveMybatisExecutor reactiveMybatisExecutor)
Instantiates a new Default reactive sql session.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
close()
close session
|
reactor.core.publisher.Mono<Void> |
commit(boolean force)
Perform commits database connection.
|
reactor.core.publisher.Mono<Integer> |
delete(String statement,
Object parameter)
Execute a delete statement.
|
R2dbcMybatisConfiguration |
getConfiguration()
Retrieves current configuration.
|
<T> T |
getMapper(Class<T> type)
Retrieves a mapper.
|
reactor.util.context.Context |
initReactiveExecutorContext(reactor.util.context.Context context)
init reactive executor context
|
reactor.util.context.Context |
initReactiveExecutorContext(reactor.util.context.Context context,
R2dbcStatementLog r2dbcStatementLog)
init reactive executor context with R2dbcStatementLog
|
reactor.core.publisher.Mono<Integer> |
insert(String statement,
Object parameter)
Execute an insert statement with the given parameter object.
|
reactor.core.publisher.Mono<Void> |
rollback(boolean force)
Discards pending batch statements and rolls database connection back.
|
<E> reactor.core.publisher.Flux<E> |
selectList(String statement,
Object parameter,
org.apache.ibatis.session.RowBounds rowBounds)
Retrieve many mapped objects from the statement key and parameter,
within the specified row bounds.
|
<T> reactor.core.publisher.Mono<T> |
selectOne(String statement,
Object parameter)
Retrieve a single row mapped from the statement key and parameter.
|
ReactiveSqlSession |
setAutoCommit(boolean autoCommit)
set auto commit
|
ReactiveSqlSession |
setIsolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel)
set isolation level
|
reactor.core.publisher.Mono<Integer> |
update(String statement,
Object parameter)
Execute an update statement.
|
ReactiveSqlSession |
usingTransaction(boolean usingTransactionSupport)
set transaction or not
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommit, delete, insert, rollback, selectList, selectList, selectOne, updatecurrentContext, currentContextAttribute, initReactiveExecutorContextAttribute, initReactiveExecutorContextAttributepublic DefaultReactiveSqlSession(R2dbcMybatisConfiguration configuration, ReactiveMybatisExecutor reactiveMybatisExecutor)
configuration - the configurationreactiveMybatisExecutor - the reactive mybatis executorpublic ReactiveSqlSession setAutoCommit(boolean autoCommit)
ReactiveSqlSessionsetAutoCommit in interface ReactiveSqlSessionautoCommit - the auto commitpublic ReactiveSqlSession setIsolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel)
ReactiveSqlSessionsetIsolationLevel in interface ReactiveSqlSessionisolationLevel - the isolation levelpublic ReactiveSqlSession usingTransaction(boolean usingTransactionSupport)
ReactiveSqlSessionusingTransaction in interface ReactiveSqlSessionusingTransactionSupport - the using transaction supportpublic <T> reactor.core.publisher.Mono<T> selectOne(String statement, Object parameter)
ReactiveSqlSessionselectOne in interface ReactiveSqlSessionT - the returned object typestatement - Unique identifier matching the statement to use.parameter - A parameter object to pass to the statement.public <E> reactor.core.publisher.Flux<E> selectList(String statement, Object parameter, org.apache.ibatis.session.RowBounds rowBounds)
ReactiveSqlSessionselectList in interface ReactiveSqlSessionE - the returned list element typestatement - Unique identifier matching the statement to use.parameter - A parameter object to pass to the statement.rowBounds - Bounds to limit object retrievalpublic reactor.core.publisher.Mono<Integer> insert(String statement, Object parameter)
ReactiveSqlSessioninsert in interface ReactiveSqlSessionstatement - Unique identifier matching the statement to execute.parameter - A parameter object to pass to the statement.public reactor.core.publisher.Mono<Integer> update(String statement, Object parameter)
ReactiveSqlSessionupdate in interface ReactiveSqlSessionstatement - Unique identifier matching the statement to execute.parameter - A parameter object to pass to the statement.public reactor.core.publisher.Mono<Integer> delete(String statement, Object parameter)
ReactiveSqlSessiondelete in interface ReactiveSqlSessionstatement - Unique identifier matching the statement to execute.parameter - A parameter object to pass to the statement.public reactor.core.publisher.Mono<Void> commit(boolean force)
ReactiveSqlSessioncommit in interface ReactiveSqlSessionforce - forces connection commitpublic reactor.core.publisher.Mono<Void> rollback(boolean force)
ReactiveSqlSessionrollback in interface ReactiveSqlSessionforce - forces connection rollbackpublic R2dbcMybatisConfiguration getConfiguration()
ReactiveSqlSessiongetConfiguration in interface ReactiveSqlSessionpublic <T> T getMapper(Class<T> type)
ReactiveSqlSessiongetMapper in interface ReactiveSqlSessionT - the mapper typetype - Mapper interface classpublic reactor.core.publisher.Mono<Void> close()
ReactiveSqlSessionclose in interface ReactiveSqlSessionpublic reactor.util.context.Context initReactiveExecutorContext(reactor.util.context.Context context,
R2dbcStatementLog r2dbcStatementLog)
MybatisReactiveContextManagerinitReactiveExecutorContext in interface MybatisReactiveContextManagercontext - the contextr2dbcStatementLog - the statement log helperpublic reactor.util.context.Context initReactiveExecutorContext(reactor.util.context.Context context)
MybatisReactiveContextManagerinitReactiveExecutorContext in interface MybatisReactiveContextManagercontext - the contextCopyright © 2022. All rights reserved.