Re: [SQLObject] Multiple ORDER BY statements?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2005-07-06 15:35:32
|
On Wed, Jul 06, 2005 at 06:25:59PM +0300, ?mit ?ztosun wrote: > Is it possible to use multiple "order by" statements with SQLObject? > The aim is produce a SQL statement similar to "SELECT * FROM a_table > ORDER BY date1 DESC, priority ASC". Yes, it is possible. Use list or tuple for orderBy. With expressions: ATable.select(orderBy=[DESC(ATable.q.date1), ATable.q.priority]) or with strings: ATable.select(orderBy=["-date1", "priority") Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |