[sqlalchemy] Re: Implementing ranking

2007-12-23 Thread Jonathan Ellis

On 12/19/07, voltron [EMAIL PROTECTED] wrote:

 Could someone tell me how to simulate the rank() function? I am using
 PostgreSQL which does not have this a s a native function.

SA doesn't give any special support for this.  You'll have to rewrite
your query.  For example,
http://archives.postgresql.org/pgsql-sql/2005-03/msg00294.php

-Jonathan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Session.query(..).all() default ORDER BY?

2007-12-23 Thread jerryji

Hi,

My simple Session.query(model.SomeClass).all() is producing an SQL
query statement with an unwanted ORDER BY some_table.primary_key.
How can this be turned off/overwritten?

Thanks in advance and Merry X'mas!

Jerry
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---