updater

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 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 Option

type Option func(p *PushModifier)

func Asc

func Asc() Option

func AscWith

func AscWith(f mongodb.Field) Option

func Desc

func Desc() Option

func DescWith

func DescWith(f mongodb.Field) Option

func Position

func Position(pos int) Option

func Slice

func Slice(n int) Option

type PushModifier

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

func NewModifier

func NewModifier(options ...Option) *PushModifier

type Updater

type Updater interface {
	ToBsonM() bson.M
}

func Batch

func Batch(u1 Updater, updaters ...Updater) Updater

func New

func New(f mongodb.Field, op string, value interface{}) Updater

func PullByFilter

func PullByFilter(f mongodb.Field, filter filter.Filter) Updater

func PushByModifier

func PushByModifier(f mongodb.Field, modifier PushModifier, each interface{}) Updater

Jump to

Keyboard shortcuts

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