aggregates

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Now = "$$NOW"
)

Variables

This section is empty.

Functions

func ToObjectId

func ToObjectId(field string, expr Expression) bson.E

func ToString

func ToString(field string, expr Expression) bson.E

Types

type ComplexGroupId

type ComplexGroupId bson.D

type Expression

type Expression interface {
	IsExpression()
}

type GraphLookup

type GraphLookup struct {
	// contains filtered or unexported fields
}

func (*GraphLookup) Marshal

func (l *GraphLookup) Marshal() primitive.D

func (*GraphLookup) Tag

func (l *GraphLookup) Tag()

func (*GraphLookup) ToMap

func (l *GraphLookup) ToMap() primitive.M

type GroupField

type GroupField struct {
	// contains filtered or unexported fields
}

func NewGroupField

func NewGroupField(name, accumulator string, expression Expression) *GroupField

func (*GroupField) Marshal

func (g *GroupField) Marshal() primitive.E

func (*GroupField) Tag

func (g *GroupField) Tag()

type GroupId

type GroupId interface {
	// contains filtered or unexported methods
}

type LongVariable

type LongVariable int64

type Lookup

type Lookup struct {
	// contains filtered or unexported fields
}

func NewLookup

func NewLookup(from, as string) *Lookup

func (*Lookup) Join

func (l *Lookup) Join(localField, foreignField string) *Lookup

func (*Lookup) Marshal

func (l *Lookup) Marshal() primitive.D

func (*Lookup) Pipeline

func (l *Lookup) Pipeline(pipeline bson.Array, let ...Expression) *Lookup

func (*Lookup) Tag

func (l *Lookup) Tag()

func (*Lookup) ToMap

func (l *Lookup) ToMap() primitive.M

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

func Match

func Match(filter *filters.Filter) *Matcher

func (*Matcher) Marshal

func (m *Matcher) Marshal() primitive.D

func (*Matcher) ToMap

func (m *Matcher) ToMap() primitive.M

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func New

func New() *Pipeline

func (*Pipeline) Count

func (p *Pipeline) Count(field string) *Pipeline

func (*Pipeline) Facet

func (p *Pipeline) Facet(facets ...*model.Facet) *Pipeline

func (*Pipeline) Group

func (p *Pipeline) Group(id GroupId, fields ...*GroupField) *Pipeline

func (*Pipeline) Lookup

func (p *Pipeline) Lookup(l *Lookup) *Pipeline

func (*Pipeline) Marshal

func (p *Pipeline) Marshal() mongo.Pipeline

func (*Pipeline) Match

func (p *Pipeline) Match(query ...*filters.Filter) *Pipeline

type Projector

type Projector struct {
	// contains filtered or unexported fields
}

func Project

func Project(def bson.M) *Projector

func (*Projector) Marshal

func (p *Projector) Marshal() primitive.D

func (*Projector) Tag

func (p *Projector) Tag()

func (*Projector) ToMap

func (p *Projector) ToMap() primitive.M

type RootReplacer

type RootReplacer struct {
	// contains filtered or unexported fields
}

func ReplaceRoot

func ReplaceRoot(expr Expression) *RootReplacer

func (*RootReplacer) Marshal

func (r *RootReplacer) Marshal() primitive.D

func (*RootReplacer) Tag

func (r *RootReplacer) Tag()

func (*RootReplacer) ToMap

func (r *RootReplacer) ToMap() primitive.M

type StringGroupId

type StringGroupId string

type StringVariable

type StringVariable string

func (StringVariable) IsExpression

func (v StringVariable) IsExpression()

func (StringVariable) IsVariable

func (v StringVariable) IsVariable()

type Variable

type Variable interface {
	IsVariable()
}

Jump to

Keyboard shortcuts

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