On Thu, 30 Jun 2005 23:24:19 -0700, Ted Leung <[EMAIL PROTECTED]> wrote:
A Query is a predicate applied to a Set/Collection of items.   In the
new world, you will be able to apply predicates to any collection of
item.  At the moment this  happens via a FilteredCollection kind
which accepts the predicate as an argument.   Right now my intention
is to support the predicate language from the existing Query
implemenatation.  I have a feeling the Phillip may be interested in
something more Pythonic, which may also be a possiblity.   Concretely:

c = UserCollection(.....)
fc = FilteredCollection(c, "i.startDate < '3/3/2005 03:15'")

An interesting approach to a python-ic query language is to use actual Python objects and operator overloading... it's interesting to see how SQLBuilder does it: http://sqlobject.org/docs/SQLBuilder.html

problem is, python doesn't seem to have the complete flexibility needed (unlike say Lisp)

Brendan
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to