engine.execute(<some string>) doesn't know anything about what you are querying 
or what kind of data is in the result, it is a pure pass-through to the DBAPI, 
which is MySQL-Python by default here.  So your issue is with mysql-python. 
Either upgrade it, report a bug to them, or use a different MySQL DBAPI.


On Jul 11, 2013, at 4:44 PM, Matt <[email protected]> wrote:

> Sorry, forgot to mention this is for mysql.
> 
> http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
> 
> On Thursday, July 11, 2013 4:38:03 PM UTC-4, Matt wrote:
> Hi all,
> 
> I have been writing to my database using func.now(6) for datetime(6) valued 
> columns and it has worked perfectly.  However, I've recently run into an 
> issue with querying for these values.  It would appear that every time I 
> query for the values in datetime(6) columns it returns None.
> 
> Examples of datetime(6) values: 
> 
> '2013-07-10 17:22:49.113604'
> '2013-07-10 17:55:08.920235'
> 
> Attempts at retrieving datetime(6) values from the database:
> 
> python:
> print self.engine.execute("select now()").scalar()
> print self.engine.execute("select now(6)").scalar()
> 
> output:
> 2013-07-11 16:33:04
> None
> 
> and same thing happens when retrieving an entire row from a table. I didn't 
> think it was necessary to go into that sort of detail as I'm hoping this is 
> an easy fix, but if need be I can show parts of my schema and datamodel along 
> with queries and results for those records.
> 
> Any insight would be great.
> Thanks,
> Matt
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to