[CalendarServer-changes] [9648] CalendarServer/branches/users/glyph/q
source_changes at macosforge.org
source_changes at macosforge.org
Sat Aug 11 01:55:21 PDT 2012
Revision: 9648
http://trac.macosforge.org/projects/calendarserver/changeset/9648
Author: glyph at apple.com
Date: 2012-08-11 01:55:21 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
stub
Modified Paths:
--------------
CalendarServer/branches/users/glyph/q/twext/enterprise/dal/record.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/q/
Modified: CalendarServer/branches/users/glyph/q/twext/enterprise/dal/record.py
===================================================================
--- CalendarServer/branches/users/glyph/q/twext/enterprise/dal/record.py 2012-08-11 08:55:20 UTC (rev 9647)
+++ CalendarServer/branches/users/glyph/q/twext/enterprise/dal/record.py 2012-08-11 08:55:21 UTC (rev 9648)
@@ -44,6 +44,13 @@
+class NoSuchRecord(Exception):
+ """
+ No matching record could be found.
+ """
+
+
+
class _RecordBase(object):
"""
Superclass for all database-backed record classes. (i.e. an object mapped
@@ -149,6 +156,20 @@
@classmethod
@inlineCallbacks
+ def pop(cls, primaryKey):
+ """
+ Atomically retrieve and remove a row from this L{_RecordBase}'s table
+ with a primary key value of C{primaryKey}.
+
+ @return: a L{Deferred} that fires with an instance of C{cls}, or fails
+ with L{NoSuchRecord} if there were no records in the database.
+ @rtype: L{Deferred}
+ """
+ yield None
+
+
+ @classmethod
+ @inlineCallbacks
def query(cls, txn, expr, order=None, ascending=True):
"""
Query the table that corresponds to C{cls}, and return instances of
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120811/198a0b1b/attachment.html>
More information about the calendarserver-changes
mailing list