Versions in this module Expand all Collapse all v4 v4.0.2 Jun 16, 2021 Changes in this version + var AllValue = `all` + var CriteriaSeparator = `/` + var DefaultIdentityField = `id` + var DefaultNormalizerFunc = func(in string) string + var FieldLengthDelimiter = `#` + var FieldTermSeparator = `/` + var ModifierDelimiter = `:` + var QueryUnescapeValues = false + var SortAscending = `+` + var SortDescending = `-` + var ValueSeparator = `|` + func IsExactMatchOperator(operator string) bool + func IsInvertingOperator(operator string) bool + func Render(generator IGenerator, collectionName string, filter *Filter) ([]byte, error) + func SplitModifierToken(in string) (string, string) + type Aggregate struct + Aggregation Aggregation + Field string + type Aggregation int + const Average + const Count + const First + const Last + const Maximum + const Minimum + const Sum + type ConjunctionType string + const AndConjunction + const OrConjunction + type Criterion struct + Aggregation Aggregation + Field string + Length int + Operator string + Type dal.Type + Values []interface{} + func (self *Criterion) IsExactMatch() bool + func (self *Criterion) String() string + type Filter struct + Conjunction ConjunctionType + Criteria []Criterion + Fields []string + IdentityField string + Limit int + MatchAll bool + Normalizer NormalizerFunc + Offset int + Options map[string]interface{} + Paginate bool + Sort []string + Spec string + func All() *Filter + func Copy(other *Filter) Filter + func FromMap(in map[string]interface{}) (*Filter, error) + func MakeFilter(specs ...string) Filter + func MustParse(in interface{}) *Filter + func New() *Filter + func Null() *Filter + func Parse(in interface{}) (*Filter, error) + func ParseSpec(spec string) (*Filter, error) + func (self *Filter) AddCriteria(criteria ...Criterion) *Filter + func (self *Filter) ApplyOptions(in interface{}) error + func (self *Filter) BoundedBy(limit int, offset int) *Filter + func (self *Filter) CriteriaFields() []string + func (self *Filter) GetFirstValue() (interface{}, bool) + func (self *Filter) GetIdentityValue() (interface{}, bool) + func (self *Filter) GetSort() []SortBy + func (self *Filter) GetValues(field string) ([]interface{}, bool) + func (self *Filter) IdOnly() bool + func (self *Filter) IsMatchAll() bool + func (self *Filter) MatchesRecord(record *dal.Record) bool + func (self *Filter) NewFromMap(in map[string]interface{}) (*Filter, error) + func (self *Filter) NewFromSpec(specs ...string) (*Filter, error) + func (self *Filter) SortBy(fields ...string) *Filter + func (self *Filter) String() string + func (self *Filter) WithFields(fields ...string) *Filter + type Generator struct + func (self *Generator) Finalize(_ *Filter) error + func (self *Generator) Payload() []byte + func (self *Generator) Push(data []byte) + func (self *Generator) Reset() + func (self *Generator) Set(data []byte) + type IGenerator interface + AggregateByField func(Aggregation, string) error + Finalize func(*Filter) error + GetValues func() []interface{} + GroupByField func(string) error + Initialize func(string) error + OrCriterion func(Criterion) error + Payload func() []byte + Push func([]byte) + Reset func() + Set func([]byte) + SetOption func(string, interface{}) error + WithCriterion func(Criterion) error + WithField func(string) error + type NormalizerFunc func(in string) string + type SortBy struct + Descending bool + Field string Other modules containing this package github.com/ozanturksever/pivot