Aggregate class

Aggregate functions such as Count, Sum, Avg, min and max columnName The Column being aggregated; ie, SUM("amount") where amount is the columnName label is used for the column name; ie: sum("amount") as myTotal, where myTotal is the label castToNumeric is used when the some or all the values in the columns are saved as String(varchar) but are numbers; converts "10" to 10

Can be used directly

Aggregate(type: AggregateType.count, columnName: "*");
Aggregate(type: AggregateType.sum, columnName: "amount", label: "totalAmount", castToNumeric: true);

or by using it's helper Objects

  Count(columnName: "*");
  Avg(columnName: "amount");
  Sum(columnName: "amount", label: "totalAmount",);
Implementers

Constructors

Aggregate({required AggregateType type, required String columnName, String? label, bool castToNumeric = false})

Properties

castToNumeric bool
final
columnName String
final
hashCode int
The hash code for this object.
no setterinherited
label String?
final
query String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type AggregateType
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited