[Zope-Coders] Proposal for minor ZCatalog improvement
Andreas Jung
andreas@andreas-jung.com
Mon, 11 Nov 2002 11:30:36 +0100
You mean that your indexes might index multiple fields of an object?
getIndexedAttribute() should return the string of the indexed attribute
or maybe a textual description. The method would only be used by the
ZMI to get a description for the indexes.
-aj
--On Montag, 11. November 2002 10:14 +0000 Toby Dickenson
<tdickenson@geminidataloggers.com> wrote:
> On Saturday 09 November 2002 9:45 am, Andreas Jung wrote:
>
>> I propose add this functionality to all Zope indexes. All interface for
>> pluggable indexes should get a new method getIndexedAttribute() that
>> returns the name of the attribute that will be indexed by this index
>
> The name of that method implies that it would be reasonable to do:
> getattr(object,index.getIndexedAttribute())
>
> Is that a requirement?
>
>
>
> I have some pluggable indexes which index properties of objects that are
> not available as attributes, and where the property identity is not
> naturally a string.
>
> Currently the id of my indexes contain the 'property identity' munged
> into an ugly string (Yes, even more ugly that "topic_txt" ;-) because I
> am constrained by the syntax of python attribute ids.
>
> Can I implement getIndexedAttribute() to return a nicely formatted
> description of the property identity?
>
>
>
>
>
> _______________________________________________
> Zope-Coders mailing list
> Zope-Coders@zope.org
> http://lists.zope.org/mailman/listinfo/zope-coders
---------------------------------------------------------------------
- Andreas Jung http://www.andreas-jung.com -
- EMail: andreas at andreas-jung.com -
- "Life is too short to (re)write parsers" -
---------------------------------------------------------------------