Re: [sqlalchemy] dialect sensible declaration

2012-07-08 Thread alex bodnaru
it worked very well, thanks a lot michael :), alex On 07/07/2012 05:13 PM, Michael Bayer wrote: sure engine and connection have .dialect.name. Foreign key constraints don't matter on SQLite unless you've actually enabled them, which is rare. I'd still use an event though so at least

[sqlalchemy] Upgrade to 0.7.8 breaks code for query().all()

2012-07-08 Thread RedBaron
I have written some code on (I think) SqlAlchemy 0.7.5 on my office computer and it works perfectly. Now I tried to run the same code on my home computer and installed Sqlalchemy 0.7.8. However, the first query statement returned an error InvalidRequestError: Select statement 'SELECT count(%s) AS

Re: [sqlalchemy] Upgrade to 0.7.8 breaks code for query().all()

2012-07-08 Thread Michael Bayer
its a bug. Here's a workaround, declare this outside of the Signature class: Signature.sig_count = column_property( select([func.count('*')]).\ where(SnortEvent.signature == Signature.id).\ correlate(Signature.__table__)

Re: [sqlalchemy] Upgrade to 0.7.8 breaks code for query().all()

2012-07-08 Thread Michael Bayer
I have it appearing in 0.7.3, which would imply you're on 0.7.2 on the working system. On Jul 8, 2012, at 2:31 PM, Michael Bayer wrote: its a bug. Here's a workaround, declare this outside of the Signature class: Signature.sig_count = column_property(

Re: [sqlalchemy] Upgrade to 0.7.8 breaks code for query().all()

2012-07-08 Thread Michael Bayer
yeah, actually, that's just what the behavior needs to be going forward, there are some improvements in 0.8 in that you'll be able to say correlate_except(SnortEvent), since you definitely don't want it correlated, so once that API is in place I'll add to the docs. The situation is that by

Re: [sqlalchemy] fractional second percision- mysql

2012-07-08 Thread James
Michael, Thank you for your response. Your help is greatly appreciated. Just to be clear, are these changes that you have made and that I can access if I update to 0.7 or later? And would I simply need to specify the new FracTime type instead of Time? Example: meta_timings =

Re: [sqlalchemy] fractional second percision- mysql

2012-07-08 Thread Michael Bayer
On Jul 8, 2012, at 3:21 PM, James wrote: Michael, Thank you for your response. Your help is greatly appreciated. Just to be clear, are these changes that you have made and that I can access if I update to 0.7 or later? And would I simply need to specify the new FracTime type instead of

[sqlalchemy] Alembic 0.3.5 Released

2012-07-08 Thread Michael Bayer
Hey all - I've released Alembic 0.3.5. Alembic is a migration tool for SQLAlchemy, allowing the construction of incremental migration scripts which apply alterations to an existing schema or set of schemas. It provides a very open-ended configuration model, plenty of API hooks for

[sqlalchemy] Dialect-specific UserDefinedType variants

2012-07-08 Thread Jon Parise
I have a simple HStore(UserDefinedType) implementation that works well with PostgreSQL. I'd also like to provide a more generic HStore implementation that can be used with SQLite for in-memory unit testing databases. That fallback implementation could be implemented in terms of pickled or

[sqlalchemy] Re: Upgrade to 0.7.8 breaks code for query().all()

2012-07-08 Thread RedBaron
Ah! Now I understand the genesis of the error and what I was doing wrong. Many thanks for pointing that out. Yes I am indeed running 0.7.2. I'll test it on 0.7.8 and report back. Thanks again for clearing me up on correlation. On Jul 9, 12:17 am, Michael Bayer mike...@zzzcomputing.com wrote: