MCPcopy Index your code
hub / github.com/cockscomb/cel2sql / visitCallUnary

Method visitCallUnary

cel2sql.go:547–562  ·  view source on GitHub ↗
(expr *exprpb.Expr)

Source from the content-addressed store, hash-verified

545}
546
547func (con *converter) visitCallUnary(expr *exprpb.Expr) error {
548 c := expr.GetCallExpr()
549 fun := c.GetFunction()
550 args := c.GetArgs()
551 var operator string
552 if op, found := standardSQLUnaryOperators[fun]; found {
553 operator = op
554 } else if op, found := operators.FindReverse(fun); found {
555 operator = op
556 } else {
557 return fmt.Errorf("cannot unmangle operator: %s", fun)
558 }
559 con.str.WriteString(operator)
560 nested := isComplexOperator(args[0])
561 return con.visitMaybeNested(args[0], nested)
562}
563
564func (con *converter) visitComprehension(expr *exprpb.Expr) error {
565 // TODO: introduce a macro expansion map between the top-level comprehension id and the

Callers 1

visitCallMethod · 0.95

Calls 2

visitMaybeNestedMethod · 0.95
isComplexOperatorFunction · 0.85

Tested by

no test coverage detected