field

package
v0.0.0-...-8f64e43 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IFilterField

type IFilterField interface {
	Merge(field IFilterField) IFilterField
	GetIndex() int
	GetName() string
	GetCollection() string
	GetType() string
	GetOperator() operator.IOperator
	GetValue() interface{}
	Build() IFilterField
	Output() bson.D
}

IFilterField is used to build bson filter for mongodb based on provided struct. Its main responsibility is to construct a proper bson.D from a provided single struct field. In case of field being duplicated, it merges them into a single bson.D object.

func NewFilterField

func NewFilterField(collection string, fieldType string, name string,
	value interface{}, op operator.IOperator, index int) IFilterField

NewFilterField creates a new filter field

Jump to

Keyboard shortcuts

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