Documentation ¶
Overview ¶
Package predicate is a utility package to create predicate.
Index ¶
- func And(predicates ...interface{}) interface{}
- func Between(field string, from interface{}, to interface{}) interface{}
- func Equal(field string, value interface{}) interface{}
- func False() interface{}
- func GreaterEqual(field string, value interface{}) interface{}
- func GreaterThan(field string, value interface{}) interface{}
- func ILike(field string, expr string) interface{}
- func In(field string, values ...interface{}) interface{}
- func InstanceOf(className string) interface{}
- func LessEqual(field string, value interface{}) interface{}
- func LessThan(field string, value interface{}) interface{}
- func Like(field string, expr string) interface{}
- func Not(predicates interface{}) interface{}
- func NotEqual(field string, value interface{}) interface{}
- func Or(predicates ...interface{}) interface{}
- func Regex(field string, regex string) interface{}
- func SQL(sql string) interface{}
- func True() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
func And(predicates ...interface{}) interface{}
And returns an AndPredicate with the given predicate.
func Between ¶
func Between(field string, from interface{}, to interface{}) interface{}
Between returns a BetweenPredicate with the given parameters.
func Equal ¶
func Equal(field string, value interface{}) interface{}
Equal returns an EqualPredicate with the given field and value.
func GreaterEqual ¶
func GreaterEqual(field string, value interface{}) interface{}
GreaterEqual returns a GreaterLessPredicate with the given field and value. The returned GreaterLessPredicate behaves like greater equal.
func GreaterThan ¶
func GreaterThan(field string, value interface{}) interface{}
GreaterThan returns a GreaterLessPredicate with the given field and value. The returned GreaterLessPredicate behaves like greater than.
func In ¶
func In(field string, values ...interface{}) interface{}
In returns an InPredicate with the given field and values.
func InstanceOf ¶
func InstanceOf(className string) interface{}
InstanceOf returns an InstanceOfPredicate with the given className.
func LessEqual ¶
func LessEqual(field string, value interface{}) interface{}
LessEqual returns a GreaterLessPredicate with the given field and value. The returned GreaterLessPredicate behaves like less equal.
func LessThan ¶
func LessThan(field string, value interface{}) interface{}
LessThan returns a GreaterLessPredicate with the given field and value. The returned GreaterLessPredicate behaves like less than.
func Not ¶
func Not(predicates interface{}) interface{}
Not returns a NotPredicate with the given predicate.
func NotEqual ¶
func NotEqual(field string, value interface{}) interface{}
NotEqual returns a NotEqualPredicate with the given field and value.
func Or ¶
func Or(predicates ...interface{}) interface{}
Or returns an OrPredicate with the given predicate.
Types ¶
This section is empty.