Author: ikelly Date: 2009-03-10 13:37:22 -0500 (Tue, 10 Mar 2009) New Revision: 10022
Modified: django/trunk/django/db/backends/oracle/base.py Log: Added savepoint support to the Oracle backend, necessary per the thread at http://groups.google.com/group/django-developers/browse_thread/thread/c87cf2d97478c068/ Modified: django/trunk/django/db/backends/oracle/base.py =================================================================== --- django/trunk/django/db/backends/oracle/base.py 2009-03-10 18:03:35 UTC (rev 10021) +++ django/trunk/django/db/backends/oracle/base.py 2009-03-10 18:37:22 UTC (rev 10022) @@ -36,6 +36,7 @@ needs_datetime_string_cast = False uses_custom_query_class = True interprets_empty_strings_as_nulls = True + uses_savepoints = True class DatabaseOperations(BaseDatabaseOperations): @@ -151,6 +152,12 @@ connection.cursor() return connection.ops.regex_lookup(lookup_type) + def savepoint_create_sql(self, sid): + return "SAVEPOINT " + self.quote_name(sid) + + def savepoint_rollback_sql(self, sid): + return "ROLLBACK TO SAVEPOINT " + self.quote_name(sid) + def sql_flush(self, style, tables, sequences): # Return a list of 'TRUNCATE x;', 'TRUNCATE y;', # 'TRUNCATE z;'... style SQL statements @@ -309,7 +316,11 @@ cursor = FormatStylePlaceholderCursor(self.connection) return cursor + # Oracle doesn't support savepoint commits. Ignore them. + def _savepoint_commit(self, sid): + pass + class OracleParam(object): """ Wrapper object for formatting parameters for Oracle. If the string --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
