From: Ian B. <ia...@co...> - 2004-04-23 16:48:35
|
Eddie Corns wrote: > Hi all, I started trying out SQLObject a short while ago as a back-end to a > web app. Yesterday I tried to use a groupBy select, imagine my horror when it > said unknown keyword "groupBy". AFAICT it's been removed but I couldn't find > any more details. Is it gone for good? I just threw it in there without thinking about what it meant. Then I realized what it meant made no sense -- it only makes sense in combination with an accumulation (count, sum, etc), since GROUP BY collapses all the rows with equal values for the given column; you can then accumulate other column values, categorized by the grouped-by-column. Since head has a general way to accumulate results (thanks to Phillippe), maybe groupBy would make sense again... but even then it's a little complicated. You'd get a tuple back (or a dict or something), not SQLObject instances, since you'd dealing with categorization and accumulation. Ian |