Documentation ¶
Index ¶
- type Cond
- func And[R any](evalList ...Cond[R]) Cond[R]
- func Eq[R any, V any](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
- func Func[R any](f func(r R) bool) Cond[R]
- func Gt[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
- func Gte[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
- func Lt[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
- func Lte[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
- func Not[R any](eval Cond[R]) Cond[R]
- func Or[R any](evalList ...Cond[R]) Cond[R]
- type CondFunc
- type RecordValueGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cond ¶
Cond is the interface used to simplify Query.Filter usage
func Eq ¶
func Eq[R any, V any](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
Eq returns an Cond that returns true if the record value is equal to the given value
func Gt ¶
func Gt[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
Gt returns an Cond that returns true if the record value is greater than the given value
func Gte ¶
func Gte[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
Gte returns an Cond that returns true if the record value is greater than or equal to the given value
func Lt ¶
func Lt[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
Lt returns an Cond that returns true if the record value is less than the given value
func Lte ¶
func Lte[R any, V constraints.Ordered](valueGetter RecordValueGetter[R, V], otherValue V) Cond[R]
Lte returns an Cond that returns true if the record value is less than or equal to the given value
type RecordValueGetter ¶
RecordValueGetter is the function type used to getting a value from a record
Click to show internal directories.
Click to hide internal directories.