AggregateExtension<T extends OrmEntity> extension

Extension providing aggregate functions for query results.

on

Methods

avg(String expression, {String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Adds an AVG aggregate to the select projection.
avgValue(String expression, {String? alias}) Future<num?>

Available on Query<T>, provided by the AggregateExtension extension

Executes an AVG aggregate and returns the result.
countAggregate({String expression = '*', String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Adds a COUNT aggregate to the select projection.
max(String expression, {String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Adds a MAX aggregate to the select projection.
maxValue(String expression, {String? alias}) Future<num?>

Available on Query<T>, provided by the AggregateExtension extension

Executes a MAX aggregate and returns the result.
min(String expression, {String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Adds a MIN aggregate to the select projection.
minValue(String expression, {String? alias}) Future<num?>

Available on Query<T>, provided by the AggregateExtension extension

Executes a MIN aggregate and returns the result.
sum(String expression, {String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Adds a SUM aggregate to the select projection.
sumValue(String expression, {String? alias}) Future<num?>

Available on Query<T>, provided by the AggregateExtension extension

Executes a SUM aggregate and returns the result.
withAggregate(AggregateFunction function, String expression, {String? alias}) Query<T>

Available on Query<T>, provided by the AggregateExtension extension

Registers an aggregate projection, e.g. count('*').