[sqlalchemy] Re: Type of calculated columns

2007-12-03 Thread Mike Orr
On Nov 30, 2007 9:28 PM, Michael Bayer [EMAIL PROTECTED] wrote: yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) This doesn't work, I'm afraid. # Table t_incident defined with sa.Column(orr_id, sa.types.Integer, primary_key=True),

[sqlalchemy] Re: Type of calculated columns

2007-12-03 Thread Mike Orr
This is on MySQL 5.0.45, BTW. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from

[sqlalchemy] Re: Type of calculated columns

2007-12-03 Thread Michael Bayer
On Dec 3, 2007, at 4:05 PM, Mike Orr wrote: On Nov 30, 2007 9:28 PM, Michael Bayer [EMAIL PROTECTED] wrote: yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) This doesn't work, I'm afraid. oh...well actually in this case its because

[sqlalchemy] Re: Type of calculated columns

2007-12-03 Thread Mike Orr
On Dec 3, 2007 1:33 PM, Michael Bayer [EMAIL PROTECTED] wrote: On Dec 3, 2007, at 4:05 PM, Mike Orr wrote: On Nov 30, 2007 9:28 PM, Michael Bayer [EMAIL PROTECTED] wrote: yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) This doesn't

[sqlalchemy] Re: Type of calculated columns

2007-12-03 Thread Michael Bayer
On Dec 3, 2007, at 4:59 PM, Mike Orr wrote: oh...well actually in this case its because MSDateTime doesn't do any date/time conversion, since mysqldb returns datetime objects for us and we dont need to convert from strings...we only do it for sqlite right now. if MySQL itself is returning

[sqlalchemy] Re: Type of calculated columns

2007-12-02 Thread Lele Gaifax
On Fri, 30 Nov 2007 21:28:32 -0800 (PST) Michael Bayer [EMAIL PROTECTED] wrote: yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) OOC, why type_ and not simply type? That is not a Python keyword like say class, just a builtin function (er, type!

[sqlalchemy] Re: Type of calculated columns

2007-12-02 Thread Michael Bayer
On Dec 2, 2007, at 4:50 AM, Lele Gaifax wrote: On Fri, 30 Nov 2007 21:28:32 -0800 (PST) Michael Bayer [EMAIL PROTECTED] wrote: yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) OOC, why type_ and not simply type? That is not a Python keyword

[sqlalchemy] Re: Type of calculated columns

2007-11-30 Thread Michael Bayer
yes...add type_=DateTime to your coalesce() call - func.coalesce(date1, date2, type_=DateTime) when we implement ticket #615, standard functions like coalesce will be available in a generic form and will also know what their appropriate return type is (in this case it would probably go off the