[CalendarServer-changes] [10053] CalendarServer/branches/users/glyph/one-home-list-api
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 16 14:48:49 PST 2012
Revision: 10053
http://trac.calendarserver.org//changeset/10053
Author: glyph at apple.com
Date: 2012-11-16 14:48:49 -0800 (Fri, 16 Nov 2012)
Log Message:
-----------
straightforward (wrong) implementation that passes the tests.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/one-home-list-api/
Modified: CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py 2012-11-16 22:48:47 UTC (rev 10052)
+++ CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py 2012-11-16 22:48:49 UTC (rev 10053)
@@ -192,10 +192,17 @@
return []
+ @inlineCallbacks
def withEachCalendarHomeDo(self, action, batchSize=None):
"""
Implementation of L{ICalendarStore.withEachCalendarHomeDo}.
"""
+ txn = yield self.newTransaction()
+ allUIDs = yield Select([schema.CALENDAR_HOME.OWNER_UID],
+ From=schema.CALENDAR_HOME).on(txn)
+ for [uid] in allUIDs:
+ yield action(txn, (yield txn.calendarHomeWithUID(uid)))
+ yield txn.commit()
def newTransaction(self, label="unlabeled", disableCache=False):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121116/854443f8/attachment.html>
More information about the calendarserver-changes
mailing list