[CalendarServer-changes] [11062] CalendarServer/branches/users/glyph/start-service-start-loop/twext/ enterprise/dal/syntax.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 18 16:32:59 PDT 2013


Revision: 11062
          http://trac.calendarserver.org//changeset/11062
Author:   glyph at apple.com
Date:     2013-04-18 16:32:59 -0700 (Thu, 18 Apr 2013)
Log Message:
-----------
Support Lock statements (sort of) against SQLite, for testing.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/start-service-start-loop/twext/enterprise/dal/syntax.py

Modified: CalendarServer/branches/users/glyph/start-service-start-loop/twext/enterprise/dal/syntax.py
===================================================================
--- CalendarServer/branches/users/glyph/start-service-start-loop/twext/enterprise/dal/syntax.py	2013-04-18 23:32:59 UTC (rev 11061)
+++ CalendarServer/branches/users/glyph/start-service-start-loop/twext/enterprise/dal/syntax.py	2013-04-18 23:32:59 UTC (rev 11062)
@@ -1674,6 +1674,12 @@
 
 
     def _toSQL(self, queryGenerator):
+        if queryGenerator.dialect == SQLITE_DIALECT:
+            # FIXME - this is only stubbed out for testing right now, actual
+            # concurrency would require some kind of locking statement here.
+            # BEGIN IMMEDIATE maybe, if that's okay in the middle of a
+            # transaction or repeatedly?
+            return SQLFragment('select null')
         return SQLFragment('lock table ').append(
             self.table.subSQL(queryGenerator, [self.table])).append(
             SQLFragment(' in %s mode' % (self.mode,)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130418/2c3561ef/attachment.html>


More information about the calendarserver-changes mailing list