Commits

Mike Bayer  committed b54f999

- some execution fixes

  • Participants
  • Parent commits 9e454d6

Comments (0)

Files changed (2)

     - 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

File lib/sqlalchemy/databases/firebird.py

         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
 
 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):