where

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 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 struct {
	WithNot      bool
	IsOr         bool
	BracketLevel int
	Cmp          FieldComparator
}

func (Condition) String

func (c Condition) String() string

type Conditions

type Conditions []Condition

func (Conditions) Check

func (w Conditions) Check(item record.Record) (bool, error)

Check checks that the record satisfies all the conditions

type FieldComparator

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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