3 Aug 2004 02:58
A couple of patches: SELECT DISTINCT and index creation
Jeremy Fitzhardinge <jeremy <at> goop.org>
2004-08-03 00:58:54 GMT
2004-08-03 00:58:54 GMT
Here's a couple of patches I've been using locally with some success. The first implements DISTINCT. It behaves a lot like reverse(): you can either say: Foo.select(..., distinct=True) or res = Foo.select(...) res.distinct() # use res... This only applies to explicit select() calls. It doesn't really combine properly with count(*) either; it seems the correct way to do that is count(distinct *), but sqlite (my testing DB) doesn't implement that, and needs a much more complex variant using DISTINCT sub-selects. So I've ignored that for now. The second is an updated version of the patch I posted the other day. It allows you to specify indexes when defining a table class. There's an example at the top of the patch. Both patches are against the current SVN head. I'd be interested to know if anyone finds these useful, or if I'm just barking up the wrong tree. Thanks, J(Continue reading)
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
RSS Feed