View Source Ash.Query.Aggregate (ash v2.6.18)
Represents an aggregated association value
Link to this section Summary
Functions
Create a new aggregate, used with Query.aggregate or Api.aggregate
Link to this section Types
@type kind() :: :custom | :avg | :min | :max | :list | :sum | :first | :count
Link to this section Functions
Create a new aggregate, used with Query.aggregate or Api.aggregate
Options:
:path(list ofatom/0) - The relationship path to aggregate over. Only used when adding aggregates to a query.:query(term/0) - A base query to use for the aggregate, or a keyword list to be passed toAsh.Query.build/2:field(atom/0) - The field to use for the aggregate. Not necessary for all aggregate types.:default(term/0) - A default value to use for the aggregate if it returnsnil.:filterable?(boolean/0) - Wether or not this aggregate may be used in filters.:type(term/0) - A type to use for the aggregate.:constraints(term/0) - Type constraints to use for the aggregate.:implementation(term/0) - The implementation for any custom aggregates.:uniq?(boolean/0) - Wether or not to only consider unique values. Only relevant forcountandlistaggregates.