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

Method callContains

cel2sql.go:279–300  ·  view source on GitHub ↗
(target *exprpb.Expr, args []*exprpb.Expr)

Source from the content-addressed store, hash-verified

277}
278
279func (con *converter) callContains(target *exprpb.Expr, args []*exprpb.Expr) error {
280 con.str.WriteString("INSTR(")
281 if target != nil {
282 nested := isBinaryOrTernaryOperator(target)
283 err := con.visitMaybeNested(target, nested)
284 if err != nil {
285 return err
286 }
287 con.str.WriteString(", ")
288 }
289 for i, arg := range args {
290 err := con.visit(arg)
291 if err != nil {
292 return err
293 }
294 if i < len(args)-1 {
295 con.str.WriteString(", ")
296 }
297 }
298 con.str.WriteString(") != 0")
299 return nil
300}
301
302func (con *converter) callDuration(target *exprpb.Expr, args []*exprpb.Expr) error {
303 if len(args) != 1 {

Callers 1

visitCallFuncMethod · 0.95

Calls 3

visitMaybeNestedMethod · 0.95
visitMethod · 0.95

Tested by

no test coverage detected