On Wed, Aug 06, 2008 at 07:10:12PM +0200, Petr Jake?? wrote: > I am on Firebird right now. AFIK Firebird does not support 'date'. > The syntax which works is: > > cast(test.ts as date) = '2008-08-01' > > But Python does not accept following construction: > > print list(Test.select(func.cast(Test.q.ts as date) == '2008-08-01'))
Of course no. Not SQLObject fault, though. ;) You can overcome this by using strings: print list(Test.select("cast(ts as date) == '2008-08-01'")) or by implementing your own 'func'-like object (name it 'cast') so you can pass it two parameters; something like this: print list(Test.select(cast(Test.q.ts, 'date') == '2008-08-01')) See sqlobject/sqlbuilder.py on how 'func' is implemented. 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss