public class DefaultReactiveUpdate<E> extends DefaultUpdate<E,ReactiveUpdate<E>> implements ReactiveUpdate<E>
TermTypeConditionalSupport.Accepter<T,O>, TermTypeConditionalSupport.SimpleAccepter<T,O>accepter, contextKeyValues, excludes, includes, mapping, operator, table, tempInstance, terms| 构造器和说明 |
|---|
DefaultReactiveUpdate(RDBTableMetadata table,
UpdateOperator operator,
EntityColumnMapping mapping,
ContextKeyValue<?>... keyValues) |
| 限定符和类型 | 方法和说明 |
|---|---|
reactor.core.publisher.Mono<Integer> |
execute()
执行更新
|
ReactiveUpdate<E> |
onExecute(java.util.function.BiFunction<ReactiveUpdate<E>,reactor.core.publisher.Mono<Integer>,reactor.core.publisher.Mono<Integer>> consumer)
在执行更新后做一些响应式操作,在操作时可以获取到Update,比如更新缓存.
|
accept, and, and, doExecute, excludes, getAccepter, includes, nest, or, or, orNest, set, set, setNull, toQueryParam, toQueryParamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexcludes, excludes, excludes, includes, includes, includes, set, set, set, set, setNull, setNull, setNull, toQueryParam, toQueryParam$like, $like, $like, $like$, $like$, $like$, accept, accept, accept, accept, and, and, and, and, and, and, and, and, between, between, between, getAccepter, gt, gt, gt, gte, gte, gte, in, in, in, in, in, in, in, is, is, is, isEmpty, isEmpty, isNull, isNull, like, like, like, like$, like$, like$, lt, lt, lt, lte, lte, lte, nest, nest, not, not, not, notBetween, notBetween, notBetween, notEmpty, notEmpty, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notLike, notNull, notNull, or, or, or, or, or, or, or, or, orNest, where, where, where, where, wherepublic DefaultReactiveUpdate(RDBTableMetadata table, UpdateOperator operator, EntityColumnMapping mapping, ContextKeyValue<?>... keyValues)
public reactor.core.publisher.Mono<Integer> execute()
ReactiveUpdateexecute 在接口中 ReactiveUpdate<E>public ReactiveUpdate<E> onExecute(java.util.function.BiFunction<ReactiveUpdate<E>,reactor.core.publisher.Mono<Integer>,reactor.core.publisher.Mono<Integer>> consumer)
ReactiveUpdate
createUpdate()
.set("state",1)
.where()
.in("id",idList)
.onExecute((update,result)->{
return result
.flatMap(i-> this
.createQuery()
.setParam(update.toQueryParam())//获取到update的where参数
.fetch()
.flatMap(this::clearCache)
.thenReturn(i);
}).execute();
onExecute 在接口中 ReactiveUpdate<E>consumer - 执行结果处理器Copyright © 2023. All rights reserved.