in visitors.go [113:145]
func VisitBoundPredicate[T any](e BoundPredicate, visitor BoundBooleanExprVisitor[T]) T {
switch e.Op() {
case OpIn:
return visitor.VisitIn(e.Term(), e.(BoundSetPredicate).Literals())
case OpNotIn:
return visitor.VisitNotIn(e.Term(), e.(BoundSetPredicate).Literals())
case OpIsNan:
return visitor.VisitIsNan(e.Term())
case OpNotNan:
return visitor.VisitNotNan(e.Term())
case OpIsNull:
return visitor.VisitIsNull(e.Term())
case OpNotNull:
return visitor.VisitNotNull(e.Term())
case OpEQ:
return visitor.VisitEqual(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpNEQ:
return visitor.VisitNotEqual(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpGTEQ:
return visitor.VisitGreaterEqual(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpGT:
return visitor.VisitGreater(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpLTEQ:
return visitor.VisitLessEqual(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpLT:
return visitor.VisitLess(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpStartsWith:
return visitor.VisitStartsWith(e.Term(), e.(BoundLiteralPredicate).Literal())
case OpNotStartsWith:
return visitor.VisitNotStartsWith(e.Term(), e.(BoundLiteralPredicate).Literal())
}
panic(fmt.Errorf("%w: unhandled bound predicate type: %s", ErrNotImplemented, e))
}