From: Mike Bayer Date: Fri, 25 Dec 2009 17:07:27 +0000 (+0000) Subject: - Fixed erroneous reference to "owner" attribute in X-Git-Tag: rel_0_5_7~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9487913f860049a7c7801793f5e88224a6b3748;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Fixed erroneous reference to "owner" attribute in Informix dialect when reflecting tables. [ticket:1645] --- diff --git a/CHANGES b/CHANGES index b7209ec584..86f3de0055 100644 --- a/CHANGES +++ b/CHANGES @@ -127,6 +127,11 @@ CHANGES Trusted_Connection when constructing pyodbc connect arguments [ticket:1561] +- informix + - Fixed erroneous reference to "owner" attribute in + Informix dialect when reflecting tables. + [ticket:1645] + - ext - A column can be added to a joined-table declarative superclass after the class has been constructed diff --git a/lib/sqlalchemy/databases/informix.py b/lib/sqlalchemy/databases/informix.py index 4476af3b9c..e6241fc6b0 100644 --- a/lib/sqlalchemy/databases/informix.py +++ b/lib/sqlalchemy/databases/informix.py @@ -160,7 +160,7 @@ ischema_names = { 1 : InfoSmallInteger, # SMALLINT 2 : InfoInteger, # INT 3 : InfoNumeric, # Float - 3 : InfoNumeric, # SmallFloat + 4 : InfoNumeric, # SmallFloat 5 : InfoNumeric, # DECIMAL 6 : InfoInteger, # Serial 7 : InfoDate, # DATE @@ -253,11 +253,11 @@ class InfoDialect(default.DefaultDialect): if not rows : raise exc.NoSuchTableError(table.name) else: - if table.owner is not None: - if table.owner.lower() in [r[0] for r in rows]: - owner = table.owner.lower() + if table.schema is not None: + if table.schema.lower() in [r[0] for r in rows]: + owner = table.schema.lower() else: - raise AssertionError("Specified owner %s does not own table %s"%(table.owner, table.name)) + raise AssertionError("Specified owner %s does not own table %s"%(table.schema, table.name)) else: if len(rows)==1: owner = rows[0][0] @@ -490,4 +490,4 @@ dialect.statement_compiler = InfoCompiler dialect.schemagenerator = InfoSchemaGenerator dialect.schemadropper = InfoSchemaDropper dialect.preparer = InfoIdentifierPreparer -dialect.execution_ctx_cls = InfoExecutionContext \ No newline at end of file +dialect.execution_ctx_cls = InfoExecutionContext