AssociationToMany
An association that defines a to-many connection.
protocol AssociationToMany : Association
Browse conforming typesBuilding Association Aggregates
func average(some SQLSpecificExpressible
) -> AssociationAggregate<OriginRowDecoder> Returns the average of the given expression in associated records.
var count: AssociationAggregate<OriginRowDecoder>
The number of associated records.
var isEmpty: AssociationAggregate<OriginRowDecoder>
Returns a boolean aggregate that is true if no associated records exist.
func max(some SQLSpecificExpressible
) -> AssociationAggregate<OriginRowDecoder> Returns the maximum value of the given expression in associated records.
func min(some SQLSpecificExpressible
) -> AssociationAggregate<OriginRowDecoder> Returns the minimum value of the given expression in associated records.
func sum(some SQLSpecificExpressible
) -> AssociationAggregate<OriginRowDecoder> Returns the sum of the given expression in associated records.
func total(some SQLSpecificExpressible
) -> AssociationAggregate<OriginRowDecoder> Returns the sum of the given expression in associated records.
struct AssociationAggregate<RowDecoder>
A value aggregated from a population of associated records.