Oleg, > You didn't think on my hint, did you: > "Hint: how can you express the ineqality with a dict?"
I did think, but I'm not very smart. I thought you were implying that it couldn't be done. 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! Python and SQLObject are easy enough to use that they let those of us without any formal programming background do real work. Unfortunately, that doesn't leave us well equipped to answer riddles from developers... Is it something about writing out the query as a string formatted with %s %s placeholders, and then feeding in the dict? I'm at the outer limits of my range here, and gasping for oxygen. > You can try to do .selectBy(**dict).filter(another_expression). Would the syntax be something like: another_expression = 'Person.q.timeStamp <= datetime.date.today()' or another_expression = 'timeStamp <= datetime.date.today()' TIA, cs On Tuesday 05 February 2008 07:59:22 Oleg Broytmann wrote: > On Tue, Feb 05, 2008 at 08:27:47AM -0500, Christopher Singley wrote: > > Is there another method for building a select query that allows me not to > > hardwire the names of the columns into the code, that's also compatible > > with adding an inequality? > > You didn't think on my hint, did you: > "Hint: how can you express the ineqality with a dict?" > > > Can I do a dict-based select, then do a subselect involving the > > inequality? > > You can try to do .selectBy(**dict).filter(another_expression). > > 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