model

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateGroup added in v0.0.4

type AggregateGroup bson.M

func NewAggregateGroup added in v0.0.7

func NewAggregateGroup() AggregateGroup

func (AggregateGroup) Field added in v0.0.6

func (a AggregateGroup) Field(field, from string) AggregateGroup

func (AggregateGroup) SumFixed added in v0.0.6

func (a AggregateGroup) SumFixed(field string, value int) AggregateGroup

type AggregatePage added in v0.0.4

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

type AggregatePipeline added in v0.0.4

type AggregatePipeline mongo.Pipeline

func NewAggregatePipeline added in v0.0.5

func NewAggregatePipeline() AggregatePipeline

func (AggregatePipeline) Group added in v0.0.4

func (AggregatePipeline) Match added in v0.0.4

func (a AggregatePipeline) Match(filter Filter) AggregatePipeline

func (AggregatePipeline) Page added in v0.0.4

type Filter

type Filter bson.M

func NewFilter

func NewFilter() Filter

func TypedFilter

func TypedFilter(raw bson.M) Filter

func (Filter) Eq

func (f Filter) Eq(field string, value interface{}) Filter

func (Filter) IgnoreCaseRegex added in v0.0.4

func (f Filter) IgnoreCaseRegex(field string, pattern string)

func (Filter) In

func (f Filter) In(field string, value []interface{}) Filter

func (Filter) Nin

func (f Filter) Nin(field string, value []interface{}) Filter

func (Filter) Or

func (f Filter) Or(conditions bson.A) Filter

func (Filter) Regex added in v0.0.4

func (f Filter) Regex(field string, pattern string)

type FindOneAndUpdate

type FindOneAndUpdate struct {
	Filter Filter
	Update Update
}

func NewFindOneAndUpdate added in v0.0.4

func NewFindOneAndUpdate() *FindOneAndUpdate

func (*FindOneAndUpdate) SetFilter added in v0.0.4

func (m *FindOneAndUpdate) SetFilter(filter Filter) *FindOneAndUpdate

func (*FindOneAndUpdate) SetUpdate added in v0.0.4

func (m *FindOneAndUpdate) SetUpdate(update Update) *FindOneAndUpdate

type Update

type Update bson.M

func (Update) Set

func (u Update) Set(update bson.M) Update

func (Update) SetOnInsert

func (u Update) SetOnInsert(update bson.M) Update

type UpdateById

type UpdateById struct {
	Id     primitive.ObjectID
	Update Update
}

type UpdateMany

type UpdateMany struct {
	Filter Filter
	Update Update
}

Jump to

Keyboard shortcuts

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