Having an exists function would be great. I was trying to do the same using CatalogQuery, but I found no way to check for Missing.Value, which is the repr() of what's in the catalog's metadata field for objects that don't have that attribute/function. I also ran into problems doing more complex or'ing and and'ing, and I assume we'll have better luck with ZOQLMethod for that. I just tried out ZOQLMethod as well. Couldn't get it to work, but it looks like really solid craftsmanship. I like the user-friendly way of selecting base object and the complete syntax. :) Some questions: 1. I couldn't get any query to work. I keep getting exceptions.TypeError argument 2 to map() must be a sequence object Here's an example query that I've tried SELECT id WHERE title == '' RECURSIVE; 2. Is the ZCatalog searching implemented? How do I activate it? 3. Do you have any plans to implement JOIN? The exists function would be very cool. Keep up the great work. Hope this helps flush out some features :) Bye, -- Bjorn Stephan wrote: [...]
I actually need to look at Casey's code and see what I can reuse. The efficiency of my version is not that great yet, but much more flexible. So I want to take Casey's code and optimize mine a little.
BTW, I just added a mailing list and a poll for ZOQL. Please go to http://demo.iuveno-net.de/iuveno/Products/ZOQLMethod and vote in the poll, so I can get an estimate of the general interest.
I have one question: is it possible using a normal catalog query or Kavio's catalog query to check if a value is not set? The representation returned is Missing.Value, but I seem to be unable to say, e.g, 'Description == Missing.Value' etc. How hard is it to add such functionality?
You mean, whether the system checks, if a property exists at all or is set to None? I think both would be no problem.
1. Property exists or not:
I could support a function, like: exists(Property) Example:
SELECT * FROM Test WHERE exists(Property);
2. Property is set to None:
Simply use equal: Property == None Note: That might work already? I have to check... Example:
SELECT * FROM Test WHERE Property == None;
Regards, Stephan
-- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )