aggregate

package
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avg added in v0.6.1

func Avg(t any) *query.Avg

Aggregate Avg uses database aggregate to get a average on the target

Is used with query.Avg as argument for select

Example

goe.Select[struct {
	Avg query.Avg
}](&struct {
	Avg *query.Avg
}{
	Avg: aggregate.Avg(&db.Animal.Id),
})

func Count

func Count(t any) *query.Count

Aggregate Count uses database aggregate to make a count on the target

Is used with query.Count as argument for select

Example

goe.Select[struct {
	Count query.Count
}](&struct {
	Count *query.Count
}{
	Count: aggregate.Count(&db.Animal.Id),
})

func Max added in v0.6.1

func Max(t any) *query.Max

Aggregate Max uses database aggregate to get the maximum value on the target

Is used with query.Max as argument for select

Example

goe.Select[struct {
	Max query.Max
}](&struct {
	Max *query.Max
}{
	Max: aggregate.Max(&db.Animal.Id),
})

func Min added in v0.6.1

func Min(t any) *query.Min

Aggregate Min uses database aggregate to get the minimum value on the target

Is used with query.Min as argument for select

Example

goe.Select[struct {
	Min query.Min
}](&struct {
	Min *query.Min
}{
	Min: aggregate.Min(&db.Animal.Id),
})

func Sum added in v0.6.1

func Sum(t any) *query.Sum

Aggregate Sum uses database aggregate to sum the values on the target

Is used with query.Sum as argument for select

Example

goe.Select[struct {
	Sum query.Sum
}](&struct {
	Sum *query.Sum
}{
	Sum: aggregate.Sum(&db.Animal.Id),
})

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL