mgo

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

type Op

type Op int

An Op represents a predicate operator.

const (
	// Comparision Query Operators
	OpEQ Op = iota
	OpNEQ
	OpGT
	OpGTE
	OpLT
	OpLTE
	OpIn
	OpNotIn
	// Logical Query Operators
	OpAnd
	OpNot
	OpNor
	OpOr
	// Element Query Operators
	OpExists
	OpType

	// Field Update Operators
	OpSet
	OpInc

	// Array Update Operatos
	OpPop
	OpPull
	OpPush
)

Predicate operators

type Predicate

type Predicate struct {
	Builder
	// contains filtered or unexported fields
}

func And

func And(pp ...*Predicate) *Predicate

func EQ

func EQ(field string, value interface{}) *Predicate

func GT

func GT(field string, value interface{}) *Predicate

func GTE

func GTE(field string, value interface{}) *Predicate

func In

func In(field string, value ...interface{}) *Predicate

func LT

func LT(field string, value interface{}) *Predicate

func LTE

func LTE(field string, value interface{}) *Predicate

func NEQ

func NEQ(field string, value interface{}) *Predicate

func Nor

func Nor(pp ...*Predicate) *Predicate

func NotIn

func NotIn(field string, value ...interface{}) *Predicate

func Or

func Or(pp ...*Predicate) *Predicate

func P

func P(fns ...func(*Builder)) *Predicate

func (*Predicate) EQ

func (p *Predicate) EQ(field string, value interface{}) *Predicate

func (*Predicate) GT

func (p *Predicate) GT(field string, value interface{}) *Predicate

func (*Predicate) GTE

func (p *Predicate) GTE(field string, value interface{}) *Predicate

func (*Predicate) In

func (p *Predicate) In(field string, value ...interface{}) *Predicate

func (*Predicate) LT

func (p *Predicate) LT(field string, value interface{}) *Predicate

func (*Predicate) LTE

func (p *Predicate) LTE(field string, value interface{}) *Predicate

func (*Predicate) NEQ

func (p *Predicate) NEQ(field string, value interface{}) *Predicate

func (*Predicate) Not

func (p *Predicate) Not(field string, p2 *Predicate) *Predicate

func (*Predicate) NotIn

func (p *Predicate) NotIn(field string, value ...interface{}) *Predicate

func (*Predicate) Query

func (p *Predicate) Query() bson.D

Jump to

Keyboard shortcuts

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