MCPcopy Index your code
hub / github.com/dresende/node-orm2 / addAggregate

Function addAggregate

lib/AggregateFunctions.js:178–184  ·  view source on GitHub ↗
(proto, fun, builder)

Source from the content-addressed store, hash-verified

176}
177
178function addAggregate(proto, fun, builder) {
179 if (Array.isArray(fun)) {
180 proto[fun[0].toLowerCase()] = builder((fun[1] || fun[0]).toLowerCase());
181 } else {
182 proto[fun.toLowerCase()] = builder(fun.toLowerCase());
183 }
184}
185
186function aggregateAlias(fun, fields) {
187 return fun + (fields && fields.length ? "_" + fields.join("_") : "");

Callers 1

AggregateFunctionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected