I appreciate the explanation.

> > >    You can try to do .selectBy(**dict).filter(another_expression).

This looks like it is solving my problem; I appended an .orderBy('-date') to 
the clause and that also seems to work well.  Is there some documentation I 
can review somewhere that enumerates the functions I can use on selects?  The 
methods are too magic to be approached by help(SelectResults) and 
dir(SelectResults).

Thanks again!  SQLObject is a truly excellent piece of software; I love it.

cs

On Tuesday 05 February 2008 08:39:39 Oleg Broytmann wrote:
> 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.



-------------------------------------------------------------------------
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
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to