comparators

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplementComparator = errors.New("not implemented ComparatorType")
	ErrFailCastType           = errors.New("can't cast type")
)

Functions

This section is empty.

Types

type BoolFieldComparator

type BoolFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.BoolGetter
	Value  []bool
}

func (BoolFieldComparator) Compare

func (fc BoolFieldComparator) Compare(item interface{}) (bool, error)

func (BoolFieldComparator) CompareValue

func (fc BoolFieldComparator) CompareValue(value bool) (bool, error)

func (BoolFieldComparator) GetField

func (fc BoolFieldComparator) GetField() string

func (BoolFieldComparator) GetType

type Enum16FieldComparator

type Enum16FieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.Enum16Getter
	Value  []record.Enum16
}

func (Enum16FieldComparator) Compare

func (fc Enum16FieldComparator) Compare(item interface{}) (bool, error)

func (Enum16FieldComparator) CompareValue

func (fc Enum16FieldComparator) CompareValue(value uint16) (bool, error)

func (Enum16FieldComparator) GetField

func (fc Enum16FieldComparator) GetField() string

func (Enum16FieldComparator) GetType

type Enum8FieldComparator

type Enum8FieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.Enum8Getter
	Value  []record.Enum8
}

func (Enum8FieldComparator) Compare

func (fc Enum8FieldComparator) Compare(item interface{}) (bool, error)

func (Enum8FieldComparator) CompareValue

func (fc Enum8FieldComparator) CompareValue(value uint8) (bool, error)

func (Enum8FieldComparator) GetField

func (fc Enum8FieldComparator) GetField() string

func (Enum8FieldComparator) GetType

type Int32FieldComparator

type Int32FieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.Int32Getter
	Value  []int32
}

func (Int32FieldComparator) Compare

func (fc Int32FieldComparator) Compare(item interface{}) (bool, error)

func (Int32FieldComparator) CompareValue

func (fc Int32FieldComparator) CompareValue(value int32) (bool, error)

func (Int32FieldComparator) GetField

func (fc Int32FieldComparator) GetField() string

func (Int32FieldComparator) GetType

type Int64FieldComparator

type Int64FieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.Int64Getter
	Value  []int64
}

func (Int64FieldComparator) Compare

func (fc Int64FieldComparator) Compare(item interface{}) (bool, error)

func (Int64FieldComparator) CompareValue

func (fc Int64FieldComparator) CompareValue(value int64) (bool, error)

func (Int64FieldComparator) GetField

func (fc Int64FieldComparator) GetField() string

func (Int64FieldComparator) GetType

type IntFieldComparator

type IntFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.IntGetter
	Value  []int
}

func (IntFieldComparator) Compare

func (fc IntFieldComparator) Compare(item interface{}) (bool, error)

func (IntFieldComparator) CompareValue

func (fc IntFieldComparator) CompareValue(value int) (bool, error)

func (IntFieldComparator) GetField

func (fc IntFieldComparator) GetField() string

func (IntFieldComparator) GetType

type InterfaceFieldComparator

type InterfaceFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.InterfaceGetter
	Value  []interface{}
}

func (InterfaceFieldComparator) Compare

func (fc InterfaceFieldComparator) Compare(item interface{}) (bool, error)

func (InterfaceFieldComparator) CompareValue

func (fc InterfaceFieldComparator) CompareValue(value interface{}) (bool, error)

func (InterfaceFieldComparator) GetField

func (fc InterfaceFieldComparator) GetField() string

func (InterfaceFieldComparator) GetType

type MapFieldComparator

type MapFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.MapGetter
	Value  []interface{}
}

func (MapFieldComparator) Compare

func (fc MapFieldComparator) Compare(item interface{}) (bool, error)

func (MapFieldComparator) CompareValue

func (fc MapFieldComparator) CompareValue(value record.Map) (bool, error)

func (MapFieldComparator) GetField

func (fc MapFieldComparator) GetField() string

func (MapFieldComparator) GetType

type SetFieldComparator

type SetFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.SetGetter
	Value  []interface{}
}

func (SetFieldComparator) Compare

func (fc SetFieldComparator) Compare(item interface{}) (bool, error)

func (SetFieldComparator) CompareValue

func (fc SetFieldComparator) CompareValue(value record.Set) (bool, error)

func (SetFieldComparator) GetField

func (fc SetFieldComparator) GetField() string

func (SetFieldComparator) GetType

type StringFieldComparator

type StringFieldComparator struct {
	Cmp    where.ComparatorType
	Getter *record.StringGetter
	Value  []string
}

func (StringFieldComparator) Compare

func (fc StringFieldComparator) Compare(item interface{}) (bool, error)

func (StringFieldComparator) CompareValue

func (fc StringFieldComparator) CompareValue(value string) (bool, error)

func (StringFieldComparator) GetField

func (fc StringFieldComparator) GetField() string

func (StringFieldComparator) GetType

type StringFieldRegexpComparator

type StringFieldRegexpComparator struct {
	Cmp    where.ComparatorType
	Getter *record.StringGetter
	Value  *regexp.Regexp
}

StringFieldRegexpComparator is a special comparator for handling Regexp

func (StringFieldRegexpComparator) Compare

func (fc StringFieldRegexpComparator) Compare(item interface{}) (bool, error)

func (StringFieldRegexpComparator) CompareValue

func (fc StringFieldRegexpComparator) CompareValue(value string) (bool, error)

func (StringFieldRegexpComparator) GetField

func (fc StringFieldRegexpComparator) GetField() string

func (StringFieldRegexpComparator) GetType

Jump to

Keyboard shortcuts

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