[CalendarServer-changes] [1437]
CalendarServer/branches/users/cdaboo/fast-multiget-1425/
twistedcaldav/index.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 30 13:36:29 PDT 2007
Revision: 1437
http://trac.macosforge.org/projects/calendarserver/changeset/1437
Author: cdaboo at apple.com
Date: 2007-03-30 13:36:28 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Add method to allow someone to determine whether a particular calendar query filter will be fully satisfied by an
SQL. This allows the caller to avoid doing a full calendar search if the index search does it.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py
Modified: CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py
===================================================================
--- CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py 2007-03-30 20:35:13 UTC (rev 1436)
+++ CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py 2007-03-30 20:36:28 UTC (rev 1437)
@@ -233,6 +233,14 @@
results = self._db_values_for_sql(statement, *names)
return results
+ def searchValid(self, filter):
+ if isinstance(filter, caldavxml.Filter):
+ qualifiers = calendarquery.sqlcalendarquery(filter)
+ else:
+ qualifiers = None
+
+ return qualifiers is not None
+
def search(self, filter):
"""
Finds resources matching the given qualifiers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070330/84944755/attachment.html
More information about the calendarserver-changes
mailing list