types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateOperatorType

type DateOperatorType int64
const (
	Before DateOperatorType = iota
	After
	Is
	IsNot
)

func ParseDateOperator

func ParseDateOperator(s string) DateOperatorType

type DatesFilterField

type DatesFilterField struct {
	Operator    DateOperatorType
	CompareWith time.Time
	// contains filtered or unexported fields
}

func (DatesFilterField) GetFieldName

func (f DatesFilterField) GetFieldName() string

func (DatesFilterField) GetOperatorToString

func (f DatesFilterField) GetOperatorToString() string

func (DatesFilterField) GetValue

func (f DatesFilterField) GetValue() string

func (*DatesFilterField) ToSQL

func (f *DatesFilterField) ToSQL() string

type EnumFilterField

type EnumFilterField struct {
	Operator   EnumOperatorType
	Collection []string
	// contains filtered or unexported fields
}

func (EnumFilterField) GetFieldName

func (f EnumFilterField) GetFieldName() string

func (EnumFilterField) GetOperatorToString

func (f EnumFilterField) GetOperatorToString() string

func (EnumFilterField) GetValue

func (f EnumFilterField) GetValue() string

func (*EnumFilterField) ToSQL

func (f *EnumFilterField) ToSQL() string

type EnumOperatorType

type EnumOperatorType int64
const (
	In EnumOperatorType = iota
	NotIn
)

func ParseEnumOperator

func ParseEnumOperator(s string) EnumOperatorType

type Filter

type Filter interface {
	ToSQL() string

	GetOperatorToString() string
	GetFieldName() string
	GetValue() string
}

type NumberFilterField

type NumberFilterField struct {
	Operator    NumberOperatorType
	CompareWith int
	// contains filtered or unexported fields
}

func (NumberFilterField) GetFieldName

func (f NumberFilterField) GetFieldName() string

func (NumberFilterField) GetOperatorToString

func (f NumberFilterField) GetOperatorToString() string

func (NumberFilterField) GetValue

func (f NumberFilterField) GetValue() string

func (*NumberFilterField) ToSQL

func (f *NumberFilterField) ToSQL() string

type NumberOperatorType

type NumberOperatorType int64
const (
	LessThan NumberOperatorType = iota
	GreaterThan
	LessOrEqual
	GreaterOrEqual
	Equal
	NotEqual
)

func ParseNumberOperator

func ParseNumberOperator(s string) NumberOperatorType

type StringFilterField

type StringFilterField struct {
	Operator    StringOperatorType
	CompareWith string
	// contains filtered or unexported fields
}

func (StringFilterField) GetFieldName

func (f StringFilterField) GetFieldName() string

func (StringFilterField) GetOperatorToString

func (f StringFilterField) GetOperatorToString() string

func (StringFilterField) GetValue

func (f StringFilterField) GetValue() string

func (*StringFilterField) ToSQL

func (f *StringFilterField) ToSQL() string

type StringOperatorType

type StringOperatorType int64
const (
	Equals StringOperatorType = iota
	NotEquals
	Contains
	NotContains
)

func ParseStringsOperator

func ParseStringsOperator(s string) StringOperatorType

Jump to

Keyboard shortcuts

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