Closed
Description
Migrated issue, originally created by Sok Ann Yap (@sayap)
With the LIMIT/OFFSET workaround for mssql, there is no auto-correlation for the ORDER BY clause, as it is compiled separately.
Seems to work as intended if I get the whole SELECT to compile together using the over()
method added in version 0.7.
Attachments: mssql-limit_offset-correlated_order_by-r1.diff | mssql-limit_offset-correlated_order_by.diff
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon Jul 24, 2012
Sok Ann Yap (@sayap) wrote:
The diff that works for me
sqlalchemy-bot commentedon Jul 24, 2012
Changes by Sok Ann Yap (@sayap):
sqlalchemy-bot commentedon Jul 24, 2012
Michael Bayer (@zzzeek) wrote:
OK just curious, can you test that this does it also, as an option to avoid those parens for now (there's a different fix for that in 0.8):
sqlalchemy-bot commentedon Jul 24, 2012
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Jul 24, 2012
Sok Ann Yap (@sayap) wrote:
With the change in comment:1, I got exception:
sqlalchemy-bot commentedon Jul 24, 2012
Michael Bayer (@zzzeek) wrote:
OK, I'd gather maybe some tests pass a string for order_by, will have to play with it.
(testing trac comment editing)
sqlalchemy-bot commentedon Aug 30, 2012
Sok Ann Yap (@sayap) wrote:
A patch against 0.7.8 that doesn't add the extra parenthesis
sqlalchemy-bot commentedon Aug 30, 2012
Changes by Sok Ann Yap (@sayap):
sqlalchemy-bot commentedon Aug 30, 2012
Sok Ann Yap (@sayap) wrote:
The extra parens added by my original diff breaks ORDER BY with DESC, as it generate clauses such as
ROW_NUMBER() OVER (ORDER BY (xxx.id DESC))
. I have attached another diff without this problem.sqlalchemy-bot commentedon Sep 30, 2012
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Sep 30, 2012
Michael Bayer (@zzzeek) wrote:
that last patch is great. this is committed in 0.7, 0.8.
e35a6b9
0d41daa
sqlalchemy-bot commentedon Sep 30, 2012
Changes by Michael Bayer (@zzzeek):