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

Method visitCallMapIndex

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

Source from the content-addressed store, hash-verified

506}
507
508func (con *converter) visitCallMapIndex(expr *exprpb.Expr) error {
509 c := expr.GetCallExpr()
510 args := c.GetArgs()
511 m := args[0]
512 nested := isBinaryOrTernaryOperator(m)
513 if err := con.visitMaybeNested(m, nested); err != nil {
514 return err
515 }
516 fieldName, err := extractFieldName(args[1])
517 if err != nil {
518 return err
519 }
520 con.str.WriteString(".`")
521 con.str.WriteString(fieldName)
522 con.str.WriteString("`")
523 return nil
524}
525
526func (con *converter) visitCallListIndex(expr *exprpb.Expr) error {
527 c := expr.GetCallExpr()

Callers 1

visitCallIndexMethod · 0.95

Calls 3

visitMaybeNestedMethod · 0.95
extractFieldNameFunction · 0.85

Tested by

no test coverage detected