MCPcopy Create free account
hub / github.com/araddon/qlbridge / walkFilterFunc

Method walkFilterFunc

datasource/sqlite/sqlrewrite.go:335–344  ·  view source on GitHub ↗

Take an expression func, ensure we don't do runtime-checking (as the function) doesn't really exist, then map that function to a mongo operation exists(fieldname) regex(fieldname,value)

(node *expr.FuncNode)

Source from the content-addressed store, hash-verified

333// regex(fieldname,value)
334//
335func (m *rewrite) walkFilterFunc(node *expr.FuncNode) (expr.Node, error) {
336 switch funcName := strings.ToLower(node.Name); funcName {
337 case "exists", "missing":
338
339 default:
340 u.Warnf("not implemented %T", funcName)
341 }
342
343 return node, nil
344}
345
346// Take an expression func, ensure we don't do runtime-checking (as the function)
347// doesn't really exist, then map that function to an Mongo Aggregation/MapReduce function

Callers 1

walkNodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected