[CalendarServer-changes] [9612] CalendarServer/branches/users/glyph/q
source_changes at macosforge.org
source_changes at macosforge.org
Sat Aug 11 01:54:51 PDT 2012
Revision: 9612
http://trac.macosforge.org/projects/calendarserver/changeset/9612
Author: glyph at apple.com
Date: 2012-08-11 01:54:51 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
Make Delete(Return=) work in SQLite.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/q/twext/enterprise/dal/syntax.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/q/
Modified: CalendarServer/branches/users/glyph/q/twext/enterprise/dal/syntax.py
===================================================================
--- CalendarServer/branches/users/glyph/q/twext/enterprise/dal/syntax.py 2012-08-11 08:54:50 UTC (rev 9611)
+++ CalendarServer/branches/users/glyph/q/twext/enterprise/dal/syntax.py 2012-08-11 08:54:51 UTC (rev 9612)
@@ -1573,7 +1573,16 @@
return self._returningClause(queryGenerator, result, allTables)
+ @inlineCallbacks
+ def on(self, txn, *a, **kw):
+ if txn.dialect == SQLITE_DIALECT and self.Return is not None:
+ result = yield Select(self._returnAsList(), From=self.From,
+ Where=self.Where).on(txn, *a, **kw)
+ yield super(Delete, self).on(txn, *a, **kw)
+ returnValue(result)
+
+
class _LockingStatement(_Statement):
"""
A statement related to lock management, which implicitly has no results.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120811/587f1bb2/attachment-0001.html>
More information about the calendarserver-changes
mailing list