rules

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var False query.Rule = falseRule{}

Functions

func Contains

func Contains(left interface{}, right string) query.Rule

Contains returns rule built with CONTAINS matcher

func Eq

func Eq(left, right interface{}) query.Rule

Eq returns rule built with EQUALS matcher

func IsNotNull

func IsNotNull(field interface{}) query.Rule

IsNotNull returns rule with IS NOT NULL matcher for provided field

func IsNull

func IsNull(field interface{}) query.Rule

IsNull returns rule with IS NULL matcher for provided field

func List

func List(r ...query.Rule) []query.Rule

List is a handy alias to create slice of rules

func MatchID64

func MatchID64(id ...int64) query.Rule

MatchID64 returns rule for matching IDs

func New

func New(left interface{}, op match.Type, right interface{}) query.Rule

New builds new rule

func WithLeft

func WithLeft(r query.Rule, v interface{}) query.Rule

WithLeft constructs new rule with requested left value.

func WithRight

func WithRight(r query.Rule, v interface{}) query.Rule

WithRight constructs new rule with requested right value.

func WithType

func WithType(r query.Rule, o match.Type) query.Rule

WithLeft constructs new rule with requested type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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