Re: aggregated queries

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Mar 08 2010 - 13:00:32 EST

  • Next message: Andrew Lindesay: "Re: aggregated queries"

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

    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..ize, 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
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Mar 08 2010 - 13:01:07 EST