filter

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparer

type Comparer byte
const (
	EQ Comparer = iota
	GT
	GTE
	LT
	LTE
	NE
)

func (Comparer) String

func (c Comparer) String() string

type Filter

type Filter interface {
	ToBsonD() *bson.D
}

func And

func And(filter1, filter2 Filter, filters ...Filter) Filter

func CompareByField

func CompareByField(f1 mongodb.Field, c Comparer, f2 mongodb.Field) Filter

func CompareByValue

func CompareByValue(f mongodb.Field, c Comparer, value interface{}) Filter

func Exist

func Exist(f mongodb.Field) Filter

func New

func New(f mongodb.Field, operator string, value interface{}) Filter

func Nor

func Nor(filter1, filter2 Filter, filters ...Filter) Filter

func Not

func Not(filter Filter) Filter

func NotExist

func NotExist(f mongodb.Field) Filter

func Or

func Or(filter1, filter2 Filter, filters ...Filter) Filter

func SameElemMatch

func SameElemMatch(f mongodb.Field, filter Filter) Filter

func Type

func Type(f mongodb.Field, t bsontype.Type) Filter

Jump to

Keyboard shortcuts

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