]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Added a label to the query used within has_table() and
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Apr 2010 22:31:05 +0000 (18:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Apr 2010 22:31:05 +0000 (18:31 -0400)
has_sequence() to work with older versions of Firebird
that don't provide labels for result columns. [ticket:1521]

CHANGES
lib/sqlalchemy/dialects/firebird/base.py

diff --git a/CHANGES b/CHANGES
index 9cdae0c81b534c5297cbfeaa6a90bd90f79dbaf5..1428326c6f6ddbfb520b31fec6d0bfc855fa2e53 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,11 @@ CHANGES
     in which case the incompatible "output type handler" won't 
     be used.   This will impact decimal accuracy and some
     unicode handling issues.  [ticket:1775]
+
+- firebird
+  - Added a label to the query used within has_table() and 
+    has_sequence() to work with older versions of Firebird
+    that don't provide labels for result columns. [ticket:1521]
     
 0.6.0
 =====
index 70318157cbd6951515ded334b5317653f810aa6c..49808003998bfe6b38ff168b897721df76b65a65 100644 (file)
@@ -358,7 +358,7 @@ class FBDialect(default.DefaultDialect):
         """Return ``True`` if the given table exists, ignoring the `schema`."""
 
         tblqry = """
-        SELECT 1 FROM rdb$database
+        SELECT 1 AS has_table FROM rdb$database
         WHERE EXISTS (SELECT rdb$relation_name
                       FROM rdb$relations
                       WHERE rdb$relation_name=?)
@@ -370,7 +370,7 @@ class FBDialect(default.DefaultDialect):
         """Return ``True`` if the given sequence (generator) exists."""
 
         genqry = """
-        SELECT 1 FROM rdb$database
+        SELECT 1 AS has_sequence FROM rdb$database
         WHERE EXISTS (SELECT rdb$generator_name
                       FROM rdb$generators
                       WHERE rdb$generator_name=?)