From: Mike Bayer Date: Wed, 30 May 2007 20:27:07 +0000 (+0000) Subject: - some execution fixes X-Git-Tag: rel_0_3_8~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d7941e3b0e80da3a2762c502d79c40eb57c8d45;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - some execution fixes --- diff --git a/CHANGES b/CHANGES index 599e765e4a..f63adb7dfe 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 58d6d246f8..a02781c846 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):