From 50b7e818c232ecc483aced34e374074eb8a6ff16 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 24 Mar 2015 12:35:30 -0400 Subject: [PATCH] - also add this to Oracle, and defensively to firebird and sybase --- doc/build/changelog/changelog_10.rst | 9 +++++---- lib/sqlalchemy/dialects/firebird/base.py | 2 ++ lib/sqlalchemy/dialects/oracle/base.py | 2 ++ lib/sqlalchemy/dialects/sybase/base.py | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst index 281092ae12..056ef66f74 100644 --- a/doc/build/changelog/changelog_10.rst +++ b/doc/build/changelog/changelog_10.rst @@ -19,16 +19,17 @@ :version: 1.0.0b4 .. change:: - :tags: bug, mssql + :tags: bug, mssql, oracle, firebird, sybase :tickets: 3338 - Turned off the "simple order by" flag on the MSSQL dialect; this - is the flag that per :ticket:`2992` causes an order by or group by + Turned off the "simple order by" flag on the MSSQL, Oracle dialects; + this is the flag that per :ticket:`2992` causes an order by or group by an expression that's also in the columns clause to be copied by label, even if referenced as the expression object. The behavior for MSSQL is now the old behavior that copies the whole expression in by default, as MSSQL can be picky on these particularly in - GROUP BY expressions. + GROUP BY expressions. The flag is also turned off defensively + for the Firebird and Sybase dialects. .. change:: :tags: feature, schema diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py index 61d3646b10..9d8630d3c1 100644 --- a/lib/sqlalchemy/dialects/firebird/base.py +++ b/lib/sqlalchemy/dialects/firebird/base.py @@ -394,6 +394,8 @@ class FBDialect(default.DefaultDialect): requires_name_normalize = True supports_empty_insert = False + supports_simple_order_by_label = False + statement_compiler = FBCompiler ddl_compiler = FBDDLCompiler preparer = FBIdentifierPreparer diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index f20c2f2965..c605bd510c 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -919,6 +919,8 @@ class OracleDialect(default.DefaultDialect): supports_sane_rowcount = True supports_sane_multi_rowcount = False + supports_simple_order_by_label = False + supports_sequences = True sequences_optional = False postfetch_lastrowid = False diff --git a/lib/sqlalchemy/dialects/sybase/base.py b/lib/sqlalchemy/dialects/sybase/base.py index 34d896347b..57213382ea 100644 --- a/lib/sqlalchemy/dialects/sybase/base.py +++ b/lib/sqlalchemy/dialects/sybase/base.py @@ -435,6 +435,7 @@ class SybaseDialect(default.DefaultDialect): supports_native_boolean = False supports_unicode_binds = False postfetch_lastrowid = True + supports_simple_order_by_label = False colspecs = {} ischema_names = ischema_names -- 2.47.3