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

Method walkProjectionFunc

datasource/sqlite/sqlrewrite.go:357–365  ·  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 an Mongo Aggregation/MapReduce function min, max, avg, sum, cardinality, terms Single Value Aggregates: min, max, avg, sum, cardinality, count MultiValue aggregates: term

(node *expr.FuncNode)

Source from the content-addressed store, hash-verified

355// terms, ??
356//
357func (m *rewrite) walkProjectionFunc(node *expr.FuncNode) (expr.Node, error) {
358 switch funcName := strings.ToLower(node.Name); funcName {
359 case "count":
360 return node, nil
361 default:
362 u.Warnf("not implemented %v", funcName)
363 }
364 return node, nil
365}
366
367func eval(cur expr.Node) (value.Value, bool) {
368 switch curNode := cur.(type) {

Callers 1

selectFuncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected