aggregated queries

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Sun Mar 07 2010 - 18:08:43 EST

  • Next message: Andrus Adamchik: "Re: aggregated queries"

    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 : Sun Mar 07 2010 - 18:09:30 EST