[CalendarServer-changes] [9161] CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav /directory
source_changes at macosforge.org
source_changes at macosforge.org
Fri Apr 20 11:46:54 PDT 2012
Revision: 9161
http://trac.macosforge.org/projects/calendarserver/changeset/9161
Author: gaya at apple.com
Date: 2012-04-20 11:46:53 -0700 (Fri, 20 Apr 2012)
Log Message:
-----------
add comments about the use of KIND
Modified Paths:
--------------
CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/ldapdirectorybacker.py
CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/opendirectorybacker.py
CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/xmldirectorybacker.py
Modified: CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/ldapdirectorybacker.py
===================================================================
--- CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/ldapdirectorybacker.py 2012-04-20 18:40:09 UTC (rev 9160)
+++ CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/ldapdirectorybacker.py 2012-04-20 18:46:53 UTC (rev 9161)
@@ -295,6 +295,8 @@
for key, value in additionalVCardProps.iteritems():
if key not in constantProperties:
constantProperties[key] = value
+
+ # add KIND as constant so that query can be skipped if addressBookFilter needs a different kind
constantProperties["KIND"] = kind
Modified: CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/opendirectorybacker.py
===================================================================
--- CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/opendirectorybacker.py 2012-04-20 18:40:09 UTC (rev 9160)
+++ CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/opendirectorybacker.py 2012-04-20 18:46:53 UTC (rev 9161)
@@ -491,7 +491,11 @@
"""
Get vCards for a given addressBookFilter and addressBookQuery
"""
-
+
+ # TODO: optimization: call dsFilterFromAddressBookFilter with
+ # KIND as constant so that record type or query can be skipped if addressBookFilter needs a different kind
+ # Then combine like filters to do the query with an allowed type list
+
allRecords, filterAttributes, dsFilter = dsFilterFromAddressBookFilter( addressBookFilter,
self.vcardPropToSearchableDSAttrMap,
ABDirectoryQueryResult.vcardPropToDSAttrMap,
Modified: CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/xmldirectorybacker.py
===================================================================
--- CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/xmldirectorybacker.py 2012-04-20 18:40:09 UTC (rev 9160)
+++ CalendarServer/branches/users/gaya/ldapdirectorybacker/twistedcaldav/directory/xmldirectorybacker.py 2012-04-20 18:46:53 UTC (rev 9161)
@@ -165,6 +165,7 @@
constantProperties = ABDirectoryQueryResult.constantProperties.copy()
constantProperties["KIND"] = kind
+ # add KIND as constant so that query can be skipped if addressBookFilter needs a different kind
allRecords, filterAttributes, dsFilter = dsFilterFromAddressBookFilter( addressBookFilter, vcardPropToDirRecordAttrMap, constantProperties=constantProperties );
self.log_debug("doAddressBookQuery: queryType=\"%s\" LDAP allRecords=%s, filterAttributes=%s, query=%s" % (queryType, allRecords, filterAttributes, "None" if dsFilter is None else dsFilter.generate(),))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120420/ab244b52/attachment.html>
More information about the calendarserver-changes
mailing list