Package io.ebeaninternal.server.query
Class DefaultRelationalQueryEngine
- java.lang.Object
-
- io.ebeaninternal.server.query.DefaultRelationalQueryEngine
-
- All Implemented Interfaces:
RelationalQueryEngine
public class DefaultRelationalQueryEngine extends Object implements RelationalQueryEngine
Perform native sql fetches.
-
-
Constructor Summary
Constructors Constructor Description DefaultRelationalQueryEngine(Binder binder, String dbTrueValue, boolean binaryOptimizedUUID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(String label, long exeMicros)
Collect SQL query execution statistics.SqlRow
createSqlRow(int estimateCapacity)
Return a new SqlRow with appropriate mapping for DB true and optimised binary UUID etc.void
findEach(RelationalQueryRequest request, Consumer<SqlRow> consumer)
Find each query using relational query.void
findEach(RelationalQueryRequest request, Predicate<SqlRow> consumer)
Find each while query using relational query.void
findEachRow(RelationalQueryRequest request, RowConsumer consumer)
Find each via raw consumer.List<SqlRow>
findList(RelationalQueryRequest request)
Find a list of beans using relational query.<T> List<T>
findListMapper(RelationalQueryRequest request, RowMapper<T> mapper)
Find list via mapper.<T> T
findOneMapper(RelationalQueryRequest request, RowMapper<T> mapper)
Find one via mapper.<T> T
findSingleAttribute(RelationalQueryRequest request, Class<T> cls)
Find single attribute.<T> List<T>
findSingleAttributeList(RelationalQueryRequest request, Class<T> cls)
Find single attribute list.void
visitMetrics(MetricVisitor visitor)
Visit the metrics.
-
-
-
Constructor Detail
-
DefaultRelationalQueryEngine
public DefaultRelationalQueryEngine(Binder binder, String dbTrueValue, boolean binaryOptimizedUUID)
-
-
Method Detail
-
collect
public void collect(String label, long exeMicros)
Description copied from interface:RelationalQueryEngine
Collect SQL query execution statistics.- Specified by:
collect
in interfaceRelationalQueryEngine
-
visitMetrics
public void visitMetrics(MetricVisitor visitor)
Description copied from interface:RelationalQueryEngine
Visit the metrics.- Specified by:
visitMetrics
in interfaceRelationalQueryEngine
-
createSqlRow
public SqlRow createSqlRow(int estimateCapacity)
Description copied from interface:RelationalQueryEngine
Return a new SqlRow with appropriate mapping for DB true and optimised binary UUID etc.- Specified by:
createSqlRow
in interfaceRelationalQueryEngine
-
findEach
public void findEach(RelationalQueryRequest request, Predicate<SqlRow> consumer)
Description copied from interface:RelationalQueryEngine
Find each while query using relational query.- Specified by:
findEach
in interfaceRelationalQueryEngine
-
findEach
public void findEach(RelationalQueryRequest request, Consumer<SqlRow> consumer)
Description copied from interface:RelationalQueryEngine
Find each query using relational query.- Specified by:
findEach
in interfaceRelationalQueryEngine
-
findOneMapper
public <T> T findOneMapper(RelationalQueryRequest request, RowMapper<T> mapper)
Description copied from interface:RelationalQueryEngine
Find one via mapper.- Specified by:
findOneMapper
in interfaceRelationalQueryEngine
-
findListMapper
public <T> List<T> findListMapper(RelationalQueryRequest request, RowMapper<T> mapper)
Description copied from interface:RelationalQueryEngine
Find list via mapper.- Specified by:
findListMapper
in interfaceRelationalQueryEngine
-
findEachRow
public void findEachRow(RelationalQueryRequest request, RowConsumer consumer)
Description copied from interface:RelationalQueryEngine
Find each via raw consumer.- Specified by:
findEachRow
in interfaceRelationalQueryEngine
-
findSingleAttributeList
public <T> List<T> findSingleAttributeList(RelationalQueryRequest request, Class<T> cls)
Description copied from interface:RelationalQueryEngine
Find single attribute list.- Specified by:
findSingleAttributeList
in interfaceRelationalQueryEngine
-
findSingleAttribute
public <T> T findSingleAttribute(RelationalQueryRequest request, Class<T> cls)
Description copied from interface:RelationalQueryEngine
Find single attribute.- Specified by:
findSingleAttribute
in interfaceRelationalQueryEngine
-
findList
public List<SqlRow> findList(RelationalQueryRequest request)
Description copied from interface:RelationalQueryEngine
Find a list of beans using relational query.- Specified by:
findList
in interfaceRelationalQueryEngine
-
-