cond

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	NoStringLimit = ""
	NoIntLimit    = -1
)

Variables

View Source
var (
	AlwaysTrue  = Constant("1 = 1")
	AlwaysFalse = Constant("1 != 0")
)

Functions

func Cmp

func Cmp(f1 common.Serializable, op Operator, f2 common.Serializable) *cmp

func CmpVal

func CmpVal(f1 common.Serializable, op Operator, val common.Param) *cmpVal

func Constant

func Constant(s string) *constant

func Eq

func Eq(f common.FieldName, val common.Param) *cmpVal

func InTuple

func InTuple(fields []common.Serializable, vals []Tuple) *inTuple

Types

type Condition

type Condition = common.ConditionSerializable

func AfterNext

func AfterNext(field common.Serializable, duration time.Duration) Condition

func And

func And(cs ...Condition) Condition

func BeforeNext

func BeforeNext(field common.Serializable, duration time.Duration) Condition

func BetweenInts

func BetweenInts(f common.FieldName, start, end int) Condition

func BetweenStrings

func BetweenStrings(f common.FieldName, start, end string) Condition

func BetweenTimestamps

func BetweenTimestamps(f common.FieldName, start, end time.Time) Condition

func FieldBetweenInts

func FieldBetweenInts(f common.Serializable, start, end int) Condition

func FieldBetweenStrings

func FieldBetweenStrings(f common.Serializable, start, end string) Condition

func FieldBetweenTimestamps

func FieldBetweenTimestamps(f common.Serializable, start, end time.Time) Condition

func FieldIn

func FieldIn[V common.Param](field common.Serializable, vals ...V) Condition

func Gt

func Gt[P comparable](f common.FieldName, val P) Condition

func Gte

func Gte[P comparable](f common.FieldName, val P) Condition

func In

func In[V common.Param](field common.FieldName, vals ...V) Condition

func InFuture

func InFuture(field common.Serializable) Condition

func InPast

func InPast(field common.Serializable) Condition

func Lt

func Lt[P comparable](f common.FieldName, val P) Condition

func Lte

func Lte[P comparable](f common.FieldName, val P) Condition

func Neq

func NewerThan

func NewerThan(field common.Serializable, duration time.Duration) Condition

func OlderThan

func OlderThan(field common.Serializable, duration time.Duration) Condition

func Or

func Or(cs ...Condition) Condition

type Operator

type Operator = string

type Tuple

type Tuple = common.Tuple

Jump to

Keyboard shortcuts

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