com.infobip.spring.data.r2dbc.TransactionalRowsFetchSpec Maven / Gradle / Ivy
package com.infobip.spring.data.r2dbc;
import org.springframework.r2dbc.core.RowsFetchSpec;
import org.springframework.transaction.reactive.TransactionalOperator;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
class TransactionalRowsFetchSpec implements RowsFetchSpec {
private final RowsFetchSpec rowsFetchSpec;
private final TransactionalOperator transactionalOperator;
TransactionalRowsFetchSpec(RowsFetchSpec rowsFetchSpec,
TransactionalOperator transactionalOperator) {
this.rowsFetchSpec = rowsFetchSpec;
this.transactionalOperator = transactionalOperator;
}
@Override
public Mono one() {
return rowsFetchSpec.one().as(transactionalOperator::transactional);
}
@Override
public Mono first() {
return rowsFetchSpec.first().as(transactionalOperator::transactional);
}
@Override
public Flux all() {
return rowsFetchSpec.all().as(transactionalOperator::transactional);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy