org.zodiac.fastorm.rdb.mapping.ReactiveQuery Maven / Gradle / Ivy
The newest version!
package org.zodiac.fastorm.rdb.mapping;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* Responsive dynamic query interface
*
* @param The entity type.
*/
public interface ReactiveQuery extends DSLQuery> {
/**
* Execute the query and get the return data stream, if no result is queried, it will return {@link Flux#empty()} .
*
* @return Result stream.
*/
Flux fetch();
/**
* Execute the count query and return the count query result.
*
* @return Count query result.
*/
Mono count();
/**
* Execute a query and return a single data.
*
* @return If no result is found, xx will be returned {@link Mono#empty()}.
*/
Mono fetchOne();
}