[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex - PathIndex.py:1.29.8.1

Casey Duncan casey@zope.com
Thu, 5 Dec 2002 16:07:46 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/PathIndex
In directory cvs.zope.org:/tmp/cvs-serv29848/PathIndex

Modified Files:
      Tag: casey-zcatalog-speedup-branch
	PathIndex.py 
Log Message:
Cleaned up PlugInIndex interfaces to bring them closer to reality
Added SortIndex and UniqueValueIndex interfaces, assigned them to the proper indexes
Added documentToKeyMap method to UnIndex base class. This is now used in the optimized ZCatalog sort code instead of keyForDocument


=== Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py 1.29 => 1.29.8.1 ===
--- Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py:1.29	Thu Nov 28 08:03:11 2002
+++ Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	Thu Dec  5 16:07:15 2002
@@ -44,7 +44,7 @@
 
     """
 
-    __implements__ = (PluggableIndex.PluggableIndexInterface,)
+    __implements__ = (PluggableIndex.UniqueValueIndex,)
 
     meta_type="PathIndex"
 
@@ -328,6 +328,12 @@
         else:
             return IISet(), (self.id,)
 
+    def hasUniqueValuesFor(self, name):
+        """has unique values for column name"""
+        if name == self.id:
+            return 1
+        else:
+            return 0
 
     def uniqueValues(self,name=None,withLength=0):
         """ needed to be consistent with the interface """