Documentation

Overview

Package predicate is a utility package to create predicate.

Index

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 False

func False() interface{}

False returns a FalsePredicate.

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 ILike

func ILike(field string, expr string) interface{}

ILike returns an ILikePredicate with the given field and expr.

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 Like

func Like(field string, expr string) interface{}

Like returns a LikePredicate with the given field and expr.

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.

func Regex

func Regex(field string, regex string) interface{}

Regex returns a RegexPredicate with the given field and regex.

func SQL

func SQL(sql string) interface{}

SQL returns a SQLPredicate with the given sql.

func True

func True() interface{}

True returns a TruePredicate.

Types

This section is empty.

Source Files