]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed erroneous reference to "owner" attribute in
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 25 Dec 2009 17:07:27 +0000 (17:07 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 25 Dec 2009 17:07:27 +0000 (17:07 +0000)
Informix dialect when reflecting tables.
[ticket:1645]

CHANGES
lib/sqlalchemy/databases/informix.py

diff --git a/CHANGES b/CHANGES
index b7209ec5848189eaa401d979b695ece953f6ad32..86f3de00556401817d01eaf18dea0427f663c175 100644 (file)
--- 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 
index 4476af3b9c25ea85c2fad39528f3f6014d6b13cc..e6241fc6b0bbbd1403972bf0185c60ff9a93659d 100644 (file)
@@ -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