aggregate

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avg

func Avg(t any) *avg

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

Example

goent.Select[struct {
	Avg float64
}](aggregate.Avg(&db.Exam.Result))...

func Count

func Count(t any) *count

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

Example

goent.Select[struct {
	Count count
}](aggregate.Count(&db.Animal.Id))...

func Max

func Max(t any) *max

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

Example

goent.Select[struct {
	Max float64
}](aggregate.Max(&db.Exam.Result))...

func Min

func Min(t any) *min

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

Example

goent.Select[struct {
	Min float64
}](aggregate.Min(&db.Exam.Result))...

func Sum

func Sum(t any) *sum

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

Example

goent.Select[struct {
	Sum float64
}](aggregate.Sum(&db.Exam.Result))...

Types

This section is empty.

Jump to

Keyboard shortcuts

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