Documentation
¶
Index ¶
- func Filterable(name string) query.Field
- func Indexed(name string) query.Field
- func List(f ...query.Field) []query.Field
- func New(name string, filter, sort bool, dataType interface{}) query.Field
- func Typed(f query.Field, dataType interface{}) query.Field
- func Untyped(name string, filter, sort bool) query.Field
- func VerifyCondition(c query.Condition) (err error)
- func VerifyFilter(c query.Filter) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filterable ¶
Filterable constructs new field definition with only filtering capability. It can be suitable for enums.
func Indexed ¶
Indexed constructs new field definition with enabled sorting and filtering capabilities.
func VerifyCondition ¶
VerifyCondition checks that condition has only fields on the left side of rules inside it and those fields are allowed to be used as filter (i.e. in WHERE clause).
This method will fail if string names are used instead of fields - to fix it apply boxing first.
func VerifyFilter ¶
VerifyFilter checks that condition has only fields on the left side of rules inside it and those fields are allowed to be used as filter (i.e. in WHERE clause).
Also, it checks that sorting is using fields allowing sorting operation too.
This method will fail if string names are used instead of fields - to fix it apply boxing first.
Types ¶
This section is empty.