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
Click to show internal directories.
Click to hide internal directories.