[orm-devel] Re: [orm-users] subsets of results / operators (was: orm with mxODBC)
Diedrich Vorberg
orm-devel@mailman.tux4web.de
Mon, 23 Jun 2003 21:21:10 +0200
>So that you could do queries like the following, which to me seem very
>natural:
>
># fetch only canadian addresses
>addresses = person.addresses(country='CA')
Yes, I'll do something like this.
My question: In your idea, are the addresses retrieved from the
database stored in the person object? Right now they are, but I'm not
actually using this 'feature'. It would make ORM reasonably simpler if
that would not be required.
But it also means that:
for address in person.addresses():
print address.city
for address in person.addresses():
print address.zipcode
will cause two queries. Is that allright? I can think of a chaching
system, too, but this would raise the level of complexity of orm and
the level of subtleness of its use.
>A very useful yet simple extension of this would be to allow the passing of
>an "operator" object in order to specify a condition:
Yes, I like this... I'll think about it. Would you be interested in
writing it yourself...?
Diedrich
--
_..._ Diedrich Vorberg
.' '.
/ _ _ \ http://www.tux4web.de
| (o)_(o) | info@tux4web.de
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/
'---` `---`