From: Mike Bayer Date: Sat, 12 Aug 2006 17:53:04 +0000 (+0000) Subject: turned off default case-folding rules as they wreak havoc with the current unittests, X-Git-Tag: rel_0_2_7~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e033e73f3cb859b118400acd7daf9457f42d094;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- 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,