dbs

package
v0.0.0-...-5255ffc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputToBson

func InputToBson(i Input, isUpdate bool) bson.D

func ToValueOperator

func ToValueOperator(operator Operator, value interface{}) interface{}

Types

type Filter

type Filter struct {
	Operator string      `json:"operator,omitempty"`
	Value    interface{} `json:"value,omitempty"`
}

type Filters

type Filters struct {
	And map[string][]Filter `json:"and"`
	Or  map[string][]Filter `json:"or"`
}

type Input

type Input = map[string]interface{}

type Operator

type Operator int
const (
	LIKE Operator = iota
	EXISTS
	IN
	GTE
	LTE
	LT
	GT
	EQUAL
	NOT
)

func StringToOperator

func StringToOperator(s string) Operator

func (Operator) String

func (m Operator) String() string

func (Operator) ToMongoEOperator

func (m Operator) ToMongoEOperator(k string, value interface{}) bson.E

func (Operator) ToMongoOperator

func (m Operator) ToMongoOperator(k string, value interface{}) bson.M

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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