diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-05-30 20:27:07 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-05-30 20:27:07 +0000 |
commit | 4d7941e3b0e80da3a2762c502d79c40eb57c8d45 (patch) | |
tree | ba19176bba0753a279f78f1ca146c6a56c58253a /lib/sqlalchemy/databases/firebird.py | |
parent | c5a63b7dbf31a99de0fe6f270a3ac4ce7243396a (diff) | |
download | sqlalchemy-4d7941e3b0e80da3a2762c502d79c40eb57c8d45.tar.gz |
- some execution fixes
Diffstat (limited to 'lib/sqlalchemy/databases/firebird.py')
-rw-r--r-- | lib/sqlalchemy/databases/firebird.py | 18 |
1 files changed, 5 insertions, 13 deletions
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): |