[CalendarServer-changes] [10071] CalendarServer/branches/users/glyph/one-home-list-api

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 16 14:49:15 PST 2012


Revision: 10071
          http://trac.calendarserver.org//changeset/10071
Author:   glyph at apple.com
Date:     2012-11-16 14:49:15 -0800 (Fri, 16 Nov 2012)
Log Message:
-----------
add withEachAddressbookHomeDo and remove addressbookHomes and calendarHomes APIs from SQL store.

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:49:14 UTC (rev 10070)
+++ CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py	2012-11-16 22:49:15 UTC (rev 10071)
@@ -211,6 +211,17 @@
         )
 
 
+    def withEachAddressbookHomeDo(self, action, batchSize=None):
+        """
+        Implementation of L{IAddressbookStore.withEachAddressbookHomeDo}.
+        """
+        return self._withEachHomeDo(
+            schema.ADDRESSBOOK_HOME,
+            lambda txn, uid: txn.addressbookHomeWithUID(uid),
+            action, batchSize
+        )
+
+
     def newTransaction(self, label="unlabeled", disableCache=False):
         """
         @see: L{IDataStore.newTransaction}
@@ -484,18 +495,10 @@
         raise RuntimeError("Database key %s cannot be determined." % (key,))
 
 
-    def calendarHomes(self):
-        return self.homes(ECALENDARTYPE)
-
-
     def calendarHomeWithUID(self, uid, create=False):
         return self.homeWithUID(ECALENDARTYPE, uid, create=create)
 
 
-    def addressbookHomes(self):
-        return self.homes(EADDRESSBOOKTYPE)
-
-
     def addressbookHomeWithUID(self, uid, create=False):
         return self.homeWithUID(EADDRESSBOOKTYPE, uid, create=create)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121116/668e873d/attachment.html>


More information about the calendarserver-changes mailing list