io.ebeaninternal.server.core.RelationalQueryEngine Maven / Gradle / Ivy
package io.ebeaninternal.server.core;
import io.ebean.RowConsumer;
import io.ebean.RowMapper;
import io.ebean.SqlRow;
import io.ebean.meta.MetricVisitor;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Predicate;
public interface RelationalQueryEngine {
/**
* Return a new SqlRow with appropriate mapping for DB true and optimised binary UUID etc.
*/
SqlRow createSqlRow(int estimateCapacity);
/**
* Find a list of beans using relational query.
*/
List findList(RelationalQueryRequest request, RowReader reader);
/**
* Find each while query using relational query.
*/
void findEach(RelationalQueryRequest request, RowReader reader, Predicate consumer);
/**
* Find each via raw consumer.
*/
void findEach(RelationalQueryRequest request, RowConsumer mapper);
/**
* Find one via mapper.
*/
T findOne(RelationalQueryRequest request, RowMapper mapper);
/**
* Find single attribute.
*/
T findSingleAttribute(RelationalQueryRequest request, Class cls);
/**
* Find single attribute list.
*/
List findSingleAttributeList(RelationalQueryRequest request, Class cls);
/**
* Find single attribute streaming the result to a consumer.
*/
void findSingleAttributeEach(RelationalQueryRequest request, Class cls, Consumer consumer);
/**
* Collect SQL query execution statistics.
*/
void collect(String label, long exeMicros);
/**
* Visit the metrics.
*/
void visitMetrics(MetricVisitor visitor);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy