Class AbstractReactiveMybatisExecutor

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method 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
    • Field Detail

      • connectionFactory

        protected final io.r2dbc.spi.ConnectionFactory connectionFactory
        The Connection factory.
    • Constructor Detail

      • AbstractReactiveMybatisExecutor

        protected AbstractReactiveMybatisExecutor​(R2dbcMybatisConfiguration configuration,
                                                  io.r2dbc.spi.ConnectionFactory connectionFactory)
        Instantiates a new Abstract reactive mybatis executor.
        Parameters:
        configuration - the configuration
        connectionFactory - the connection factory
    • Method Detail

      • update

        public reactor.core.publisher.Mono<Integer> update​(org.apache.ibatis.mapping.MappedStatement mappedStatement,
                                                           Object parameter)
        Description copied from interface: ReactiveMybatisExecutor
        execute update
        Specified by:
        update in interface ReactiveMybatisExecutor
        Parameters:
        mappedStatement - the mapped statement
        parameter - the parameter
        Returns:
        mono
      • query

        public <E> reactor.core.publisher.Flux<E> query​(org.apache.ibatis.mapping.MappedStatement mappedStatement,
                                                        Object parameter,
                                                        org.apache.ibatis.session.RowBounds rowBounds)
        Description copied from interface: ReactiveMybatisExecutor
        execute query
        Specified by:
        query in interface ReactiveMybatisExecutor
        Type Parameters:
        E - the type parameter
        Parameters:
        mappedStatement - the mapped statement
        parameter - the parameter
        rowBounds - the row bounds
        Returns:
        flux
      • close

        public reactor.core.publisher.Mono<Void> close​(boolean forceRollback)
        Description copied from interface: ReactiveMybatisExecutor
        close session
        Specified by:
        close in interface ReactiveMybatisExecutor
        Parameters:
        forceRollback - the force rollback
        Returns:
        mono
      • doUpdateWithConnection

        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
        Parameters:
        connection - the connection
        mappedStatement - the mapped statement
        parameter - the parameter
        Returns:
        mono
      • doQueryWithConnection

        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
        Type Parameters:
        E - the type parameter
        Parameters:
        connection - the connection
        mappedStatement - the mapped statement
        parameter - the parameter
        rowBounds - the row bounds
        Returns:
        flux
      • inConnection

        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
        Type Parameters:
        T - the type parameter
        Parameters:
        connectionFactory - the connection factory
        action - the action
        Returns:
        mono
      • inConnectionMany

        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
        Type Parameters:
        T - the type parameter
        Parameters:
        connectionFactory - the connection factory
        action - the action
        Returns:
        flux
      • closeConnection

        protected reactor.core.publisher.Mono<Void> closeConnection​(io.r2dbc.spi.Connection connection)
        Release the Connection.
        Parameters:
        connection - the connection
        Returns:
        mono