From 4e033e73f3cb859b118400acd7daf9457f42d094 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 12 Aug 2006 17:53:04 +0000 Subject: [PATCH] turned off default case-folding rules as they wreak havoc with the current unittests, temporary isintance() checks in ASNIIdentifierPreparer which will be replaced with visit_ methodology --- lib/sqlalchemy/ansisql.py | 10 +++++----- test/engine/reflection.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index e1791324df..84b925b498 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -750,12 +750,12 @@ class ANSIIdentifierPreparer(object): def _prepare_table(self, table, use_schema=False): names = [] - if table.quote: + if isinstance(table, schema.Table) and table.quote: names.append(self._quote_identifier(table.name)) else: - names.append(self._fold_identifier_case(table.name)) + names.append(table.name) #self._fold_identifier_case(table.name)) - if not self.omit_schema and use_schema and table.schema: + if not self.omit_schema and use_schema and isinstance(table, schema.Table) and table.schema: if table.quote_schema: names.insert(0, self._quote_identifier(table.schema)) else: @@ -765,10 +765,10 @@ class ANSIIdentifierPreparer(object): def _prepare_column(self, column, use_table=True, **kwargs): names = [] - if column.quote: + if isinstance(column, schema.Column) and column.quote: names.append(self._quote_identifier(column.name)) else: - names.append(self._fold_identifier_case(column.name)) + names.append(column.name) #self._fold_identifier_case(column.name)) if use_table: names.insert(0, self._prepare_table(column.table, **kwargs)) diff --git a/test/engine/reflection.py b/test/engine/reflection.py index de2651bd2d..52fc2987d6 100644 --- a/test/engine/reflection.py +++ b/test/engine/reflection.py @@ -290,6 +290,7 @@ class CreateDropTest(PersistTest): class SchemaTest(PersistTest): # this test should really be in the sql tests somewhere, not engine + @testbase.unsupported('sqlite') def testiteration(self): metadata = MetaData() table1 = Table('table1', metadata, -- 2.47.2