[Checkins] SVN: megrok.quarry/trunk/ add preliminary support for
zc.catalog indexes Set, Value, DatetimeSet, DatetimeValue
Kevin Smith
kevin at mcweekly.com
Thu May 3 20:29:56 EDT 2007
Log message for revision 75246:
add preliminary support for zc.catalog indexes Set, Value, DatetimeSet, DatetimeValue
Changed:
U megrok.quarry/trunk/buildout.cfg
A megrok.quarry/trunk/src/megrok/quarry/index.py
-=-
Modified: megrok.quarry/trunk/buildout.cfg
===================================================================
--- megrok.quarry/trunk/buildout.cfg 2007-05-03 23:21:17 UTC (rev 75245)
+++ megrok.quarry/trunk/buildout.cfg 2007-05-04 00:29:51 UTC (rev 75246)
@@ -23,6 +23,7 @@
eggs = setuptools
grok
megrok.quarry
+ zc.catalog
recipe = zc.recipe.zope3instance
user = ksmith:123
zcml = zope.annotation
@@ -45,6 +46,7 @@
zope.app.keyreference
zope.app.twisted
zope.contentprovider
+ zc.catalog
grok
grok-meta
megrok.quarry-meta
Added: megrok.quarry/trunk/src/megrok/quarry/index.py
===================================================================
--- megrok.quarry/trunk/src/megrok/quarry/index.py 2007-05-03 23:21:17 UTC (rev 75245)
+++ megrok.quarry/trunk/src/megrok/quarry/index.py 2007-05-04 00:29:51 UTC (rev 75246)
@@ -0,0 +1,32 @@
+from grok.index import IndexDefinition
+from zc.catalog.catalogindex import ( SetIndex,
+ ValueIndex,
+ DateTimeValueIndex,
+ DateTimeSetIndex )
+
+
+class Set(IndexDefinition):
+ index_class = SetIndex
+
+
+class Value(IndexDefinition):
+ index_class = ValueIndex
+
+
+class DatetimeValue(IndexDefinition):
+ index_class = DateTimeValueIndex
+
+
+class DatetimeSet(IndexDefinition):
+
+ # DatetimeSet generates an error
+ # when index_class is set directly
+ # I set up this method for debugging
+ # and as soon as I did it worked :)
+ # YMMV
+
+ @property
+ def index_class(self):
+ #import pdb; pdb.set_trace()
+ return DateTimeSetIndex
+
More information about the Checkins
mailing list