where

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparatorType

type ComparatorType uint8
const (
	EQ ComparatorType = iota + 1
	GT
	LT
	GE
	LE
	InArray
	Like
	Regexp
	SetHas
	MapHasValue
	MapHasKey
)

type Condition

type Condition[R record.Record] struct {
	WithNot      bool
	IsOr         bool
	BracketLevel int
	Cmp          FieldComparator[R]
}

func (Condition[R]) String

func (c Condition[R]) String() string

type Conditions

type Conditions[R record.Record] []Condition[R]

func (Conditions[R]) Check

func (w Conditions[R]) Check(item R) (bool, error)

Check checks that the record satisfies all the conditions.

type FieldComparator

type FieldComparator[R record.Record] interface {
	GetField() record.Field
	GetType() ComparatorType
	Compare(item R) (bool, error)
	ValuesCount() int
	ValueAt(index int) any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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