feat: 准备支持fluent sql
This commit is contained in:
parent
58bdc3276b
commit
67db4da315
@ -33,5 +33,10 @@
|
|||||||
<groupId>dev.flyfish.framework</groupId>
|
<groupId>dev.flyfish.framework</groupId>
|
||||||
<artifactId>flyfish-data-common</artifactId>
|
<artifactId>flyfish-data-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>group.flyfish.framework</groupId>
|
||||||
|
<artifactId>fluent-sql-core</artifactId>
|
||||||
|
<version>0.0.5</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package dev.flyfish.framework.r2dbc.operations;
|
||||||
|
|
||||||
|
import group.flyfish.fluent.chain.common.ExecutableSql;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import reactor.core.publisher.Flux;
|
||||||
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我们为实际开发提供了响应式链,避免写sql
|
||||||
|
*
|
||||||
|
* @author wangyu
|
||||||
|
*/
|
||||||
|
public interface R2dbcFluentOperations {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个
|
||||||
|
*
|
||||||
|
* @param sql 可执行sql
|
||||||
|
* @param <T> 泛型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
<T> Mono<T> findOne(ExecutableSql sql);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个
|
||||||
|
*
|
||||||
|
* @param sql 可执行sql
|
||||||
|
* @param <T> 泛型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
<T> Flux<T> find(ExecutableSql sql);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分页对象
|
||||||
|
*
|
||||||
|
* @param sql 可执行sql
|
||||||
|
* @param <T> 泛型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
<T> Mono<Page<T>> find(ExecutableSql sql, Pageable pageable);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user