[sqlalchemy] Re: how to handle Date values of the form YYYY-MM-00

2009-02-02 Thread rdmurray
Quoth jason kirtland j...@discorporate.us: Now, how do I get SQLAlchemy to pass that dictionary into the MySQLdb 'connect'? :) You can pass it in via the create_engine's connect_args: http://www.sqlalchemy.org/docs/05/dbengine.html#custom-dbapi-connect-arguments Thanks. I should have

[sqlalchemy] how to handle Date values of the form YYYY-MM-00

2009-02-01 Thread rdmurray
I have an existing MySQL database (that I do not control) with schema fields defined using the 'Date' type. The values that occur in these fields often have a 'day' of '00', and sometimes a month of '00', and sometimes the field's value is -00-00. The zeros are used to indicate don't know

[sqlalchemy] Re: how to handle Date values of the form YYYY-MM-00

2009-02-01 Thread rdmurray
Quoth Michael Bayer mike...@zzzcomputing.com: Assuming these columns are ultimately CHAR or VARCHAR on the mysql side, build your own Date type using TypeDecorator in conjunction with the String type. MySQLdb's date/time functionality only takes effect for columns that are of the

[sqlalchemy] Re: how to handle Date values of the form YYYY-MM-00

2009-02-01 Thread rdmurray
Quoth jason kirtland j...@discorporate.us: rdmur...@bitdance.com wrote: I have an existing MySQL database (that I do not control) with schema fields defined using the 'Date' type. The values that occur in these fields often have a 'day' of '00', and sometimes a month of '00', and

[sqlalchemy] Re: inferring object class/table directly

2008-12-03 Thread rdmurray
On Tue, 2 Dec 2008 at 23:21, Faheem Mitha wrote: Yes, I was looking for this, and printed out obj.__dict__ but didn't see it there. A dictionary of attributes is very useful in theory, but doesn't always seem to have all attributes. Is this documented anywhere? Try dir(obj). You'll see it

[sqlalchemy] extending pre-existing tables

2008-11-10 Thread rdmurray
I sent this last week but it seems like it may not have been posted to the list...at least, I haven't seen any responses :) -- Forwarded message -- Date: Tue, 4 Nov 2008 18:00:57 -0500 (EST) From: [EMAIL PROTECTED] To: sqlalchemy@googlegroups.com Subject: extending pre-existing

[sqlalchemy] Re: extending pre-existing tables

2008-11-10 Thread rdmurray
On Mon, 10 Nov 2008 at 17:19, Michael Bayer wrote: Possibly. The fragility here is that you are relying on a model that isn't actually implemented here, i.e. that your application is written around a table inheritance assumption when that is not actually the case - the extended tables may or

[sqlalchemy] extending pre-existing (read only) tables

2008-11-04 Thread rdmurray
I've got a somewhat oddball situation, and I'm hoping for some pointers to the right sqlalchemy features to handle this. Or, failing that, hints as to the places I'm going to need to write code to compensate for the weirdness I have to deal with. The situation is that I get periodic copies of a