summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-05-30 20:27:07 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-05-30 20:27:07 +0000
commit4d7941e3b0e80da3a2762c502d79c40eb57c8d45 (patch)
treeba19176bba0753a279f78f1ca146c6a56c58253a
parentc5a63b7dbf31a99de0fe6f270a3ac4ce7243396a (diff)
downloadsqlalchemy-4d7941e3b0e80da3a2762c502d79c40eb57c8d45.tar.gz
- some execution fixes
-rw-r--r--CHANGES1
-rw-r--r--lib/sqlalchemy/databases/firebird.py18
2 files changed, 6 insertions, 13 deletions
diff --git a/CHANGES b/CHANGES
index 599e765e4..f63adb7df 100644
--- a/CHANGES
+++ b/CHANGES
@@ -53,6 +53,7 @@
- set max identifier length to 31
- supports_sane_rowcount() set to False due to ticket #370.
versioned_id_col feature wont work in FB.
+ - some execution fixes
-extensions
- new association proxy implementation, implementing complete
proxies to list, dict and set-based relation collections
diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py
index 58d6d246f..a02781c84 100644
--- a/lib/sqlalchemy/databases/firebird.py
+++ b/lib/sqlalchemy/databases/firebird.py
@@ -312,18 +312,10 @@ class FBCompiler(ansisql.ANSICompiler):
else:
self.strings[func] = func.name
- def visit_insert(self, insert):
- """Inserts are required to have the primary keys be explicitly present.
-
- mapper will by default not put them in the insert statement
- to comply with autoincrement fields that require they not be
- present. So, put them all in for all primary key columns.
- """
-
- for c in insert.table.primary_key:
- if not self.parameters.has_key(c.key):
- self.parameters[c.key] = None
- return ansisql.ANSICompiler.visit_insert(self, insert)
+ def visit_insert_column(self, column, parameters):
+ # all column primary key inserts must be explicitly present
+ if column.primary_key:
+ parameters[column.key] = None
def visit_select_precolumns(self, select):
"""Called when building a ``SELECT`` statement, position is just
@@ -372,7 +364,7 @@ class FBSchemaDropper(ansisql.ANSISchemaDropper):
class FBDefaultRunner(ansisql.ANSIDefaultRunner):
def exec_default_sql(self, default):
- c = sql.select([default.arg], from_obj=["rdb$database"]).compile(engine=self.engine)
+ c = sql.select([default.arg], from_obj=["rdb$database"]).compile(engine=self.connection)
return self.connection.execute_compiled(c).scalar()
def visit_sequence(self, seq):