Documentation ¶
Index ¶
- Constants
- Variables
- func VisitBooleanExpr[T any](e BooleanExpression, visitor BooleanExpressionVisitor[T]) (result T, err error)
- type And
- type BindVisitor
- func (BindVisitor) VisitAnd(left, right BooleanExpression) BooleanExpression
- func (BindVisitor) VisitBoundPredicate(pred BoundPredicate) BooleanExpression
- func (BindVisitor) VisitFalse() BooleanExpression
- func (BindVisitor) VisitNot(child BooleanExpression) BooleanExpression
- func (BindVisitor) VisitOr(left, right BooleanExpression) BooleanExpression
- func (BindVisitor) VisitTrue() BooleanExpression
- func (b BindVisitor) VisitUnboundPredicate(pred UnboundPredicate) BooleanExpression
- type BoolLiteral
- type BooleanExpression
- func Bind(s *icegopher.Schema, expr BooleanExpression, caseInsensitive bool) (BooleanExpression, error)
- func EqualTo[L LiteralType](term string, literal L) BooleanExpression
- func IsNull(term string) BooleanExpression
- func NotEqualTo[L LiteralType](term string, literal L) BooleanExpression
- func RewriteNot(expr BooleanExpression) (BooleanExpression, error)
- type BooleanExpressionVisitor
- type BoundBooleanExpressionVisitor
- type BoundLiteralPredicate
- type BoundPredicate
- type BoundReference
- type BoundTerm
- type BytesLiteral
- type DateLiteral
- type DecimalLiteral
- type DoubleAboveMax
- type DoubleBelowMin
- type DoubleLiteral
- type FixedLiteral
- type FloatAboveMax
- type FloatBelowMin
- type FloatLiteral
- type InclusiveMetricsEvaluator
- type IntAboveMax
- type IntBelowMin
- type IntLiteral
- type Literal
- type LiteralFalse
- type LiteralTrue
- type LiteralType
- type LongAboveMax
- type LongBelowMin
- type LongLiteral
- type Not
- type NumericLiteralType
- type Or
- type OrderedNumericLiteralType
- type Reference
- type StringLiteral
- type TimeLiteral
- type TimestampLiteral
- type UUIDLiteral
- type UnboundLiteralPredicate
- type UnboundPredicate
- type UnboundTerm
Constants ¶
View Source
const ( RowsCannotMatch = false RowsMightMatch = true )
Variables ¶
View Source
var (
ErrInvalidBinarySerialization = errors.New("invalid binary serialize")
)
View Source
var (
ErrInvalidCast = errors.New("invalid literal cast")
)
Functions ¶
func VisitBooleanExpr ¶
func VisitBooleanExpr[T any](e BooleanExpression, visitor BooleanExpressionVisitor[T]) (result T, err error)
Types ¶
type And ¶
type And struct {
Left, Right BooleanExpression
}
func (And) Invert ¶
func (a And) Invert() BooleanExpression
type BindVisitor ¶
func (BindVisitor) VisitAnd ¶
func (BindVisitor) VisitAnd(left, right BooleanExpression) BooleanExpression
func (BindVisitor) VisitBoundPredicate ¶
func (BindVisitor) VisitBoundPredicate(pred BoundPredicate) BooleanExpression
func (BindVisitor) VisitFalse ¶
func (BindVisitor) VisitFalse() BooleanExpression
func (BindVisitor) VisitNot ¶
func (BindVisitor) VisitNot(child BooleanExpression) BooleanExpression
func (BindVisitor) VisitOr ¶
func (BindVisitor) VisitOr(left, right BooleanExpression) BooleanExpression
func (BindVisitor) VisitTrue ¶
func (BindVisitor) VisitTrue() BooleanExpression
func (BindVisitor) VisitUnboundPredicate ¶
func (b BindVisitor) VisitUnboundPredicate(pred UnboundPredicate) BooleanExpression
type BoolLiteral ¶
type BoolLiteral bool
func (BoolLiteral) MarshalBinary ¶
func (b BoolLiteral) MarshalBinary() (data []byte, err error)
func (*BoolLiteral) UnmarshalBinary ¶
func (b *BoolLiteral) UnmarshalBinary(data []byte) error
func (BoolLiteral) Value ¶
func (b BoolLiteral) Value() bool
type BooleanExpression ¶
type BooleanExpression interface {
Invert() BooleanExpression
}
func Bind ¶
func Bind(s *icegopher.Schema, expr BooleanExpression, caseInsensitive bool) (BooleanExpression, error)
func EqualTo ¶
func EqualTo[L LiteralType](term string, literal L) BooleanExpression
func IsNull ¶
func IsNull(term string) BooleanExpression
func NotEqualTo ¶
func NotEqualTo[L LiteralType](term string, literal L) BooleanExpression
func RewriteNot ¶
func RewriteNot(expr BooleanExpression) (BooleanExpression, error)
type BooleanExpressionVisitor ¶
type BooleanExpressionVisitor[T any] interface { VisitTrue() T VisitFalse() T VisitNot(child T) T VisitAnd(left, right T) T VisitOr(left, right T) T VisitUnboundPredicate(pred UnboundPredicate) T VisitBoundPredicate(pred BoundPredicate) T }
type BoundBooleanExpressionVisitor ¶
type BoundBooleanExpressionVisitor[T any] interface { BooleanExpressionVisitor[T] // VisitIn(BoundTerm, []Literal) T // VisitNotIn(BoundTerm, []Literal) T // VisitIsNaN(BoundTerm) T // VisitNotNaN(BoundTerm) T VisitIsNull(BoundTerm) T VisitNotNull(BoundTerm) T VisitEqual(BoundTerm, Literal) T VisitNotEqual(BoundTerm, Literal) T }
type BoundLiteralPredicate ¶
type BoundLiteralPredicate interface { BoundPredicate Literal() Literal }
type BoundPredicate ¶
type BoundPredicate interface { BooleanExpression fmt.Stringer Term() BoundTerm }
type BoundReference ¶
type BoundReference struct {
// contains filtered or unexported fields
}
func (BoundReference) Ref ¶
func (b BoundReference) Ref() BoundReference
type BoundTerm ¶
type BoundTerm interface { Ref() BoundReference Eval(row icegopher.Row) (any, error) }
type BytesLiteral ¶
type BytesLiteral []byte
func (BytesLiteral) MarshalBinary ¶
func (b BytesLiteral) MarshalBinary() (data []byte, err error)
func (*BytesLiteral) UnmarshalBinary ¶
func (b *BytesLiteral) UnmarshalBinary(data []byte) error
func (BytesLiteral) Value ¶
func (b BytesLiteral) Value() []byte
type DateLiteral ¶
func (DateLiteral) MarshalBinary ¶
func (d DateLiteral) MarshalBinary() (data []byte, err error)
func (*DateLiteral) UnmarshalBinary ¶
func (d *DateLiteral) UnmarshalBinary(data []byte) error
func (DateLiteral) Value ¶
func (d DateLiteral) Value() icegopher.Date
type DecimalLiteral ¶
type DecimalLiteral decimal128.Num
func (DecimalLiteral) MarshalBinary ¶
func (d DecimalLiteral) MarshalBinary() (data []byte, err error)
func (*DecimalLiteral) UnmarshalBinary ¶
func (d *DecimalLiteral) UnmarshalBinary(data []byte) error
func (DecimalLiteral) Value ¶
func (d DecimalLiteral) Value() decimal128.Num
type DoubleAboveMax ¶
type DoubleAboveMax struct{}
func (DoubleAboveMax) String ¶
func (DoubleAboveMax) String() string
func (DoubleAboveMax) Value ¶
func (DoubleAboveMax) Value() float64
type DoubleBelowMin ¶
type DoubleBelowMin struct{}
func (DoubleBelowMin) String ¶
func (DoubleBelowMin) String() string
func (DoubleBelowMin) Value ¶
func (DoubleBelowMin) Value() float64
type DoubleLiteral ¶
type DoubleLiteral float64
func (DoubleLiteral) MarshalBinary ¶
func (d DoubleLiteral) MarshalBinary() (data []byte, err error)
func (*DoubleLiteral) UnmarshalBinary ¶
func (d *DoubleLiteral) UnmarshalBinary(data []byte) error
func (DoubleLiteral) Value ¶
func (d DoubleLiteral) Value() float64
type FixedLiteral ¶
type FixedLiteral []byte
func (FixedLiteral) MarshalBinary ¶
func (f FixedLiteral) MarshalBinary() (data []byte, err error)
func (*FixedLiteral) UnmarshalBinary ¶
func (f *FixedLiteral) UnmarshalBinary(data []byte) error
func (FixedLiteral) Value ¶
func (f FixedLiteral) Value() []byte
type FloatAboveMax ¶
type FloatAboveMax struct{}
func (FloatAboveMax) String ¶
func (FloatAboveMax) String() string
func (FloatAboveMax) Value ¶
func (FloatAboveMax) Value() float32
type FloatBelowMin ¶
type FloatBelowMin struct{}
func (FloatBelowMin) String ¶
func (FloatBelowMin) String() string
func (FloatBelowMin) Value ¶
func (FloatBelowMin) Value() float32
type FloatLiteral ¶
type FloatLiteral float32
func (FloatLiteral) MarshalBinary ¶
func (f FloatLiteral) MarshalBinary() (data []byte, err error)
func (*FloatLiteral) UnmarshalBinary ¶
func (f *FloatLiteral) UnmarshalBinary(data []byte) error
func (FloatLiteral) Value ¶
func (f FloatLiteral) Value() float32
type InclusiveMetricsEvaluator ¶
func NewInclusiveMetricsEvaluator ¶
func NewInclusiveMetricsEvaluator(s *icegopher.Schema, expr BooleanExpression, caseInsensitive bool) (InclusiveMetricsEvaluator, error)
type IntAboveMax ¶
type IntAboveMax struct{}
func (IntAboveMax) String ¶
func (IntAboveMax) String() string
func (IntAboveMax) Value ¶
func (IntAboveMax) Value() int32
type IntBelowMin ¶
type IntBelowMin struct{}
func (IntBelowMin) String ¶
func (IntBelowMin) String() string
func (IntBelowMin) Value ¶
func (IntBelowMin) Value() int32
type IntLiteral ¶
type IntLiteral int32
func (IntLiteral) MarshalBinary ¶
func (i IntLiteral) MarshalBinary() (data []byte, err error)
func (*IntLiteral) UnmarshalBinary ¶
func (i *IntLiteral) UnmarshalBinary(data []byte) error
func (IntLiteral) Value ¶
func (i IntLiteral) Value() int32
type Literal ¶
func NewLiteral ¶
func NewLiteral[L LiteralType](v L) Literal
type LiteralFalse ¶
type LiteralFalse struct{}
func (LiteralFalse) Invert ¶
func (LiteralFalse) Invert() BooleanExpression
type LiteralTrue ¶
type LiteralTrue struct{}
func (LiteralTrue) Invert ¶
func (LiteralTrue) Invert() BooleanExpression
type LiteralType ¶
type LongAboveMax ¶
type LongAboveMax struct{}
func (LongAboveMax) String ¶
func (LongAboveMax) String() string
func (LongAboveMax) Value ¶
func (LongAboveMax) Value() int64
type LongBelowMin ¶
type LongBelowMin struct{}
func (LongBelowMin) String ¶
func (LongBelowMin) String() string
func (LongBelowMin) Value ¶
func (LongBelowMin) Value() int64
type LongLiteral ¶
type LongLiteral int64
func (LongLiteral) MarshalBinary ¶
func (l LongLiteral) MarshalBinary() (data []byte, err error)
func (*LongLiteral) UnmarshalBinary ¶
func (l *LongLiteral) UnmarshalBinary(data []byte) error
func (LongLiteral) Value ¶
func (l LongLiteral) Value() int64
type Not ¶
type Not struct {
Child BooleanExpression
}
func (Not) Invert ¶
func (n Not) Invert() BooleanExpression
type NumericLiteralType ¶
type Or ¶
type Or struct {
Left, Right BooleanExpression
}
func (Or) Invert ¶
func (o Or) Invert() BooleanExpression
type StringLiteral ¶
type StringLiteral string
func (StringLiteral) MarshalBinary ¶
func (s StringLiteral) MarshalBinary() (data []byte, err error)
func (*StringLiteral) UnmarshalBinary ¶
func (s *StringLiteral) UnmarshalBinary(data []byte) error
func (StringLiteral) Value ¶
func (s StringLiteral) Value() string
type TimeLiteral ¶
func (TimeLiteral) MarshalBinary ¶
func (d TimeLiteral) MarshalBinary() (data []byte, err error)
func (*TimeLiteral) UnmarshalBinary ¶
func (t *TimeLiteral) UnmarshalBinary(data []byte) error
func (TimeLiteral) Value ¶
func (t TimeLiteral) Value() icegopher.Time
type TimestampLiteral ¶
func (TimestampLiteral) MarshalBinary ¶
func (d TimestampLiteral) MarshalBinary() (data []byte, err error)
func (*TimestampLiteral) UnmarshalBinary ¶
func (t *TimestampLiteral) UnmarshalBinary(data []byte) error
func (TimestampLiteral) Value ¶
func (t TimestampLiteral) Value() icegopher.Timestamp
type UUIDLiteral ¶
func (UUIDLiteral) MarshalBinary ¶
func (u UUIDLiteral) MarshalBinary() (data []byte, err error)
func (*UUIDLiteral) UnmarshalBinary ¶
func (u *UUIDLiteral) UnmarshalBinary(data []byte) error
func (UUIDLiteral) Value ¶
func (u UUIDLiteral) Value() uuid.UUID
type UnboundLiteralPredicate ¶
type UnboundLiteralPredicate interface { UnboundPredicate Literal() Literal }
type UnboundPredicate ¶
type UnboundPredicate interface { BooleanExpression fmt.Stringer Bind(s *icegopher.Schema, caseInsensitive bool) (BoundPredicate, error) }
Click to show internal directories.
Click to hide internal directories.