diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-01-09 22:17:59 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-01-12 13:01:26 -0500 |
commit | 7402987fd218c42ed2a909a5031186d2b702bb88 (patch) | |
tree | a418897eb557bbdad09878aa7dcc2e2aab7dfb3a /test/dialect/mssql/test_compiler.py | |
parent | 127ead7452f326509cde38fcf7c9f38f69d9ae0a (diff) | |
download | sqlalchemy-7402987fd218c42ed2a909a5031186d2b702bb88.tar.gz |
Make column-level collation quoting dialect-specific
Fixed regression in 1.2 where newly repaired quoting
of collation names in :ticket:`3785` breaks SQL Server,
which explicitly does not understand a quoted collation
name. Whether or not mixed-case collation names are
quoted or not is now deferred down to a dialect-level
decision so that each dialect can prepare these identifiers
directly.
Change-Id: Iaf0a8123d9bf4711219e320896bb28c5d2649304
Fixes: #4154
Diffstat (limited to 'test/dialect/mssql/test_compiler.py')
-rw-r--r-- | test/dialect/mssql/test_compiler.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dialect/mssql/test_compiler.py b/test/dialect/mssql/test_compiler.py index d62753b9d..e9f9afef5 100644 --- a/test/dialect/mssql/test_compiler.py +++ b/test/dialect/mssql/test_compiler.py @@ -45,6 +45,20 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): 'SELECT test_schema.sometable.somecolumn ' 'FROM test_schema.sometable WITH (NOLOCK)') + def test_select_w_order_by_collate(self): + m = MetaData() + t = Table('sometable', m, Column('somecolumn', String)) + + self.assert_compile( + select([t]). + order_by( + t.c.somecolumn.collate("Latin1_General_CS_AS_KS_WS_CI").asc()), + "SELECT sometable.somecolumn FROM sometable " + "ORDER BY sometable.somecolumn COLLATE " + "Latin1_General_CS_AS_KS_WS_CI ASC" + + ) + def test_join_with_hint(self): t1 = table('t1', column('a', Integer), |