[CalendarServer-changes] [7012] CalendarServer/branches/users/glyph/dalify/txdav/common/datastore/ sql.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Feb 16 06:41:15 PST 2011


Revision: 7012
          http://trac.macosforge.org/projects/calendarserver/changeset/7012
Author:   glyph at apple.com
Date:     2011-02-16 06:41:15 -0800 (Wed, 16 Feb 2011)
Log Message:
-----------
apparently _updateSyncToken is dead code, so kill it?

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/dalify/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/glyph/dalify/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/dalify/txdav/common/datastore/sql.py	2011-02-16 14:41:04 UTC (rev 7011)
+++ CalendarServer/branches/users/glyph/dalify/txdav/common/datastore/sql.py	2011-02-16 14:41:15 UTC (rev 7012)
@@ -1699,25 +1699,6 @@
 
 
     @classproperty
-    def _incrementSyncTokenQuery(cls):
-        """
-        DAL query to increment the sync token to the most recent sequence value.
-        """
-        rev = cls._revisionsSchema
-        return Update({rev.REVISION: schema.REVISION_SEQ},
-                      Where=(rev.RESOURCE_ID == Parameter("resourceID")).And(
-                          rev.RESOURCE_NAME == None),
-                      Return=rev.REVISION)
-
-
-    @inlineCallbacks
-    def _updateSyncToken(self):
-        self._syncTokenRevision = (
-            yield self._incrementSyncTokenQuery.on(
-                self._txn, resourceID=self._resourceID))[0][0]
-
-
-    @classproperty
     def _renameSyncTokenQuery(cls):
         """
         DAL query to change sync token for a rename (increment and adjust
@@ -2527,6 +2508,7 @@
         )
     )
 
+
     @inlineCallbacks
     def resourceNamesSinceToken(self, token):
         results = [
@@ -2550,17 +2532,6 @@
         returnValue((changed, deleted))
 
 
-    def _updateSyncToken(self):
-        self._syncTokenRevision =  self._txn.execSQL("""
-            update %(name)s
-            set (%(column_REVISION)s) = (nextval('%(sequence)s'))
-            where %(column_HOME_RESOURCE_ID)s = %%s and %(column_RESOURCE_NAME)s is null
-            returning %(column_REVISION)s
-            """ % self._revisionsTable,
-            [self._resourceID,]
-        )[0][0]
-
-
     def _insertRevision(self, name):
         return self._changeRevision("insert", name)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110216/db479a43/attachment-0001.html>


More information about the calendarserver-changes mailing list