On Tue, Feb 05, 2008 at 09:14:51AM -0500, Christopher Singley wrote:
> > "Hint: how can you express the ineqality with a dict?"
>
> If you've got a suggestion, I'm all ears, but you'll have
> to spell it out for the slow students in the class!
.selectBy() is strictly oriented towards equality test. It's easy to
pass a dictionary to .selectBy().
When you need non-equality test one or more keys in your dictionary are
special. But there is no way to mark these special keys in syntax like
**dict. You know what keys are special but there is no way to express such
knowledge with a dictionary. Hence you need to use another, non-dict-based
approach.
> > You can try to do .selectBy(**dict).filter(another_expression).
>
> Would the syntax be something like:
> another_expression = 'Person.q.timeStamp <= datetime.date.today()'
This is the preferred way.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss