Re: [SQLObject] Specifying defaultOrder
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-06-25 05:13:40
|
On Thu, 2003-06-19 at 09:15, Nick wrote: > el...@in... wrote: > > Andy wrote: > >>But - I'd like the records returned in reverse date order, which can be > >>achieved in SQL with an order by clause like 'dateCol DESC'. I've tried > >>this in my class definition but I get the following error; > > You must be the 6th person to ask, I was the 5th, according to Luke. :-) > > Sort order cannot currently be specified in SO. > > Should say something about the direction that development should be taking. Yeah, I'm planning on it Real Soon, I just have to look at the code. Probably options like: defaultOrder='-dateCol' defaultOrder=SQLBuilder.DESC(Something.dateCol) sel = Something.select().reversed() sel = Something.select(reversed=True) # or descending=True? |