On Nov 30, 10:15 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> a DateTime, meaning a sqlalchemy.types.DateTime ?

Yes. (sqlalchemy 0.3)

>  thats not a date-
> holding object, its a TypeEngine object which describes a date-holding
> database column.  from the code sample below I dont see how that could
> be returned since res.fetchone().changed would be the actual contents
> of a result-row column named "changed".

Here's the code:
table = Table(pfx + 'acl', self.db_metadata,
            Column('id',             Integer, primary_key = True),
            Column('last_change',    DateTime, default = func.now()),
            mysql_engine='INNODB')
[...]
s = select([table.c.last_change])
result = s.execute()
row = result.fetchone()
print "Row:", repr(row.last_change)

This results in the following output:
Row: <DateTime object for '2007-11-30 22:54:54.00' at 405a79f8>

-Samuel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to