]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Use identifier_preparer instead of preparer()
authorPaul Johnston <paj@pajhome.org.uk>
Sun, 19 Aug 2007 14:26:53 +0000 (14:26 +0000)
committerPaul Johnston <paj@pajhome.org.uk>
Sun, 19 Aug 2007 14:26:53 +0000 (14:26 +0000)
lib/sqlalchemy/databases/mssql.py

index ae3b1256e1835b930b40496b6490bcde395e6685..b6a961c2df490f445415e92e10cf986beaaec1e2 100644 (file)
@@ -310,7 +310,7 @@ class MSSQLExecutionContext(default.DefaultExecutionContext):
                 self.IINSERT = False
 
             if self.IINSERT:
-                self.cursor.execute("SET IDENTITY_INSERT %s ON" % self.dialect.preparer().format_table(self.compiled.statement.table))
+                self.cursor.execute("SET IDENTITY_INSERT %s ON" % self.dialect.identifier_preparer.format_table(self.compiled.statement.table))
 
         super(MSSQLExecutionContext, self).pre_exec()
 
@@ -322,7 +322,7 @@ class MSSQLExecutionContext(default.DefaultExecutionContext):
         
         if self.compiled.isinsert:
             if self.IINSERT:
-                self.cursor.execute("SET IDENTITY_INSERT %s OFF" % self.dialect.preparer().format_table(self.compiled.statement.table))
+                self.cursor.execute("SET IDENTITY_INSERT %s OFF" % self.dialect.identifier_preparer.format_table(self.compiled.statement.table))
                 self.IINSERT = False
             elif self.HASIDENT:
                 if not len(self._last_inserted_ids) or self._last_inserted_ids[0] is None: