[Zope-dev] ZCatalog searching for missing values
Bjorn Stabell
bjorn@exoweb.net
Mon, 8 Oct 2001 23:21:26 +0800
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 =3D=3D ''
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,
--=20
Bjorn
Stephan wrote:
[...]
> I actually need to look at Casey's code and see what I can reuse. The=20
> efficiency of my version is not that great yet, but much more=20
> flexible. So I want to take Casey's code and optimize mine a little.
>=20
> BTW, I just added a mailing list and a poll for ZOQL. Please go to=20
> http://demo.iuveno-net.de/iuveno/Products/ZOQLMethod and vote=20
> in the poll, so I can get an estimate of the general interest.
>=20
> >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 =3D=3D Missing.Value' etc. How hard is it to =
add
> >such functionality?
>=20
> You mean, whether the system checks, if a property exists at=20
> all or is set to None? I think both would be no problem.
>=20
> 1. Property exists or not:
>=20
> I could support a function, like: exists(Property)
> Example:
>=20
> SELECT *
> FROM Test
> WHERE exists(Property);
>=20
> 2. Property is set to None:
>=20
> Simply use equal: Property =3D=3D None
> Note: That might work already? I have to check...
> Example:
>=20
> SELECT *
> FROM Test
> WHERE Property =3D=3D None;
>=20
> Regards,
> Stephan
>=20
> --
> Stephan Richter
> CBU - Physics and Chemistry Student
> Web2k - Web Design/Development & Technical Project Management
>=20
>=20
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
>=20