Hi all, One of the things I often find a bit lacking in MetaModel is better (aggregate) query function support and also an addition of functions that apply transformations on each row (aka "scalar functions"). For instance, if I look at w3schools [1] they mention a bunch of functions that are quite useful in everyday querying.
The fact is that today MetaModel only supports a small set of aggregate functions: COUNT, MAX; MIN, SUM and AVG [2]. These are defined in the FunctionType enum. I think this list is too short, but also it is restrictive and un-extensible because it is an enum. It would be much better if we had an interface that consumers of MetaModel could implement for themselves. And it would be good to make a separation of aggregate and scalar functions. So I'd like to propose that we make a redesign of FunctionType. My requirements to the design would be that it * allows both aggregate and scalar functions (as separate interfaces). * allows functions to be pluggable. * finally, that we also make them potentially optimizable so that modules can push down the function execution to the backing database. Am I missing something? And do you have any remarks? Kasper [1] http://www.w3schools.com/sql/sql_functions.asp
