aggregator

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator[T any] struct {
	// contains filtered or unexported fields
}

func NewAggregator

func NewAggregator[T any](collection *mongo.Collection) *Aggregator[T]

func (*Aggregator[T]) Aggregate added in v0.0.10

func (a *Aggregator[T]) Aggregate(ctx context.Context, opts ...*options.AggregateOptions) ([]*T, error)

func (*Aggregator[T]) AggregateWithParse added in v0.11.0

func (a *Aggregator[T]) AggregateWithParse(ctx context.Context, result any, opts ...*options.AggregateOptions) error

AggregateWithParse is used to parse the result of the aggregation result must be a pointer to a slice

func (*Aggregator[T]) Pipeline

func (a *Aggregator[T]) Pipeline(pipeline any) *Aggregator[T]

Jump to

Keyboard shortcuts

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