[sqlalchemy] fractional second percision- mysql

2012-07-03 Thread James
Support, I recently updated our MySQL database to version 5.6.5 with hopes of using the newly added fractional second support for the Time datatype. Using SQLalchemy version 0.6.5 to create our table definitions, I add the fractional second percision paramater to the time type as shown in the

Re: [sqlalchemy] fractional second percision- mysql

2012-07-03 Thread Michael Bayer
On Jul 3, 2012, at 3:47 PM, James wrote: Support, I recently updated our MySQL database to version 5.6.5 with hopes of using the newly added fractional second support for the Time datatype. Using SQLalchemy version 0.6.5 to create our table definitions, I add the fractional second

Re: [sqlalchemy] How do I do this SQL query in SQLAlchemy?

2012-07-03 Thread Michael Bayer
this is a very basic series of joins which can be approached using the techniques described in the ORM tutorial: http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#querying-with-joins . the parenthesization of the joined tables within subqueries is also not needed and these tables can be

Re: [sqlalchemy] Query relationship in order

2012-07-03 Thread Michael Bayer
this is approached using joins as described in the ORM tutorial at http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#querying-with-joins . If you'd like to present a specific A to Query without filtering for A rows, you can use with_parent(), see the last example in

[sqlalchemy] Declaring tables without a metadata

2012-07-03 Thread John Anderson
I have a bunch of Mixins for SQL alchemy objects for doing standard stuff that I use in multiple projects and this all works well by using @declared_attr like this: class CategoryMixin(object): @declared_attr def title(self): Unique title for the category return