[odb-users] ODB and aggregate functions

Boris Kolpackov boris at codesynthesis.com
Fri Aug 19 04:22:25 EDT 2011


Hi Nicolas,

Nicolas ALBEZA <n.albeza at gmail.com> writes:

> I'm looking for a way to use aggregate (group-by) functions with ODB, to use
> in simple queries, such as "SELECT AVG(field) from table where ...".
> 
> It seems that ODB doesnt allow such things, so i guess i'll have to use the
> low-level and db specific functions to reach my goal.
> Is there any examples or documentation about that ? (I'm using a mysql DB).

I think the 'view' feature that is still in development will allow you
to achieve this pretty easily. I have described it a couple of days ago
in this post:

http://www.codesynthesis.com/pipermail/odb-users/2011-August/000239.html

Do you think it will work for your use case?

Boris



More information about the odb-users mailing list