summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-12-25 17:07:27 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-12-25 17:07:27 +0000
commitf9487913f860049a7c7801793f5e88224a6b3748 (patch)
tree483b6d51a2a57810d31aac8f11f6709217c5ede2
parent3bec6b6f350506fc7d6cf61717f185ce9af80704 (diff)
downloadsqlalchemy-f9487913f860049a7c7801793f5e88224a6b3748.tar.gz
- Fixed erroneous reference to "owner" attribute in
Informix dialect when reflecting tables. [ticket:1645]
-rw-r--r--CHANGES5
-rw-r--r--lib/sqlalchemy/databases/informix.py12
2 files changed, 11 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index b7209ec58..86f3de005 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 4476af3b9..e6241fc6b 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