MCPcopy Create free account
hub / github.com/cockscomb/cel2sql / visitCallListIndex

Method visitCallListIndex

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

Source from the content-addressed store, hash-verified

524}
525
526func (con *converter) visitCallListIndex(expr *exprpb.Expr) error {
527 c := expr.GetCallExpr()
528 args := c.GetArgs()
529 l := args[0]
530 nested := isBinaryOrTernaryOperator(l)
531 if err := con.visitMaybeNested(l, nested); err != nil {
532 return err
533 }
534 con.str.WriteString("[OFFSET(")
535 index := args[1]
536 if err := con.visit(index); err != nil {
537 return err
538 }
539 con.str.WriteString(")]")
540 return nil
541}
542
543var standardSQLUnaryOperators = map[string]string{
544 operators.LogicalNot: "NOT ",

Callers 1

visitCallIndexMethod · 0.95

Calls 3

visitMaybeNestedMethod · 0.95
visitMethod · 0.95

Tested by

no test coverage detected