madapt

package
v0.0.0-...-2c5f5e2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SearchTag = "search"

Variables

This section is empty.

Functions

func AddOpExist

func AddOpExist(opt AddOp) bool

func CmpOpExist

func CmpOpExist(op CMPOp) bool

func ExtendAddOp

func ExtendAddOp(addOpName string, fn func(interface{}) interface{}, options ...bool)

func ExtendCmpOp

func ExtendCmpOp(op string, fn func(match *bson.M, op, field string, value interface{}) *bson.M, opions ...bool)

func Match

func Match(cond interface{}) bson.M

func Sort

func Sort(fields ...string) bson.D

Types

type AddOp

type AddOp = string
const (
	AddOpTimeToStr    AddOp = "TimeToStr"
	AddOpStrToTime    AddOp = "StrToTime"
	AddOpStrIDToObjID AddOp = "StrIDToObjID"
)

type CMPOp

type CMPOp = string
const (
	OpEQ   CMPOp = "="
	OpNEQ  CMPOp = "neq"
	OpGT   CMPOp = "gt"
	OpGTE  CMPOp = "gte"
	OpLT   CMPOp = "lt"
	OpLTE  CMPOp = "lte"
	OpIN   CMPOp = "in"
	OpNIN  CMPOp = "nin"
	OpLIKE CMPOp = "regex"
	OpRaw  CMPOp = "raw"
)

Jump to

Keyboard shortcuts

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