Yeah I was thinking that aggregate functions are probably something that should go together with the @size.

As for the new queries addition, I'd hold off on that until we figure out the new query API we've been planning to add, as we need a single consistent API for all queries.

Andrus

On Mar 7, 2010, at 6:08 PM, Lachlan Deck wrote:

Hi there,

seeing Andrew Lindesay's recent patch for @size, I'm reminded of a related utility class I've got that may / may not be useful for Cayenne in general.

It's usage, for examples, is as follows (assuming 'age' is a property of SomeClass): int avg = new StatsQuery.Avg(SomeClass.class, "age"[, anExpression]).intResult(oc); int count = new StatsQuery.Count(SomeClass.class[, anExpression]).intResult(oc); int max = new StatsQuery.Max(SomeClass.class, "age"[, anExpression]).intResult(oc); int min = new StatsQuery.Min(SomeClass.class, "age"[, anExpression]).intResult(oc); int sum = new StatsQuery.Sum(SomeClass.class, "age"[, anExpression]).intResult(oc);

Any thoughts on it's inclusion? (e.g., preferred name, package etc)

with regards,
--

Lachlan Deck



Reply via email to