Generative query methods for aggregates

Issue #552 resolved
Former user created an issue

I started a thread about this on the mailing list but Google Groups seem to be partially down at the moment, so I can't provide the exact link.

Attached is an improved version of the patch I sent to the mailing list: it contains all 4 aggregates and has docstrings.

I wonder if the "normal" aggregate methods on query objects shouldn't be expressed in terms of the new generative methods. They would be a shortcut to apply_xxx(col).scalar(). The code wouldn't be shorter, nor faster but it would seem more logical to me. And this way, we could include the functionality of _col_aggregate directly in the scalar method (not that I'm sure this would be a good thing).

Comments (3)

  1. Mike Bayer repo owner

    thanks, applied in changeset:2547 plus a couple of unit test lines in the existing generative test (sending along test cases for all patches would be helpful). as far as merging the non-generative versions if the methods, its not critical right now so i left that out.

  2. Former user Account Deleted

    (original author: ged) Sure. I'll do that for the non experimental patches from now on.

  3. Log in to comment