Re: [sqlalchemy] Postgres migration issue

2012-08-10 Thread Warwick Prince
Hi David Thanks for that - much appreciated :-) Hi I usually use MySQL to develop on, however I need to work with Postgres for the first time today so I fired it up. I have a routine which converts a non-SQL database into the database of choice, converting its schema into a new

[sqlalchemy] Determining sqa type from dialect type

2012-08-10 Thread Warwick Prince
Hi All If I have a Column() object, is there a way of determining the sqlalchemy type from the dialect specific type? e.g. I have a Postgres TIMESTAMP column, and I want to be able to map that back the a sqa DateTime type. Why? If I want to automatically clone tables from one database to

[sqlalchemy] how can i generate IS NOT True instead of != True ( orm ) ?

2012-08-10 Thread Jonathan Vanasco
in postgresql i have a boolean field that allows Null values. i'd like to query for the items that are not 'true' filter( tablename.is_deleted != True ) creates this sql: is_deleted != True however this is incorrect and doesn't match the resultset i want. it needs to read : is_deleted

[sqlalchemy] Re: how can i generate IS NOT True instead of != True ( orm ) ?

2012-08-10 Thread David Bolen
Jonathan Vanasco jonat...@findmeon.com writes: in postgresql i have a boolean field that allows Null values. i'd like to query for the items that are not 'true' filter( tablename.is_deleted != True ) creates this sql: is_deleted != True however this is incorrect and doesn't match

[sqlalchemy] Re: how can i generate IS NOT True instead of != True ( orm ) ?

2012-08-10 Thread Jonathan Vanasco
To be fair, it is correct in terms of doing what you asked, though if you want it to include NULLs I agree it doesn't do what you want... You're absolutely correct. Poorly worded on my part. I meant to convey that it's not the correct statement for me to call ; it is indeed the correct sql

Re: [sqlalchemy] Postgres migration issue

2012-08-10 Thread Michael Bayer
On Aug 9, 2012, at 7:58 PM, Warwick Prince wrote: Hi I usually use MySQL to develop on, however I need to work with Postgres for the first time today so I fired it up. I have a routine which converts a non-SQL database into the database of choice, converting its schema into a new

Re: [sqlalchemy] Determining sqa type from dialect type

2012-08-10 Thread Michael Bayer
On Aug 10, 2012, at 5:19 AM, Warwick Prince wrote: Hi All If I have a Column() object, is there a way of determining the sqlalchemy type from the dialect specific type? e.g. I have a Postgres TIMESTAMP column, and I want to be able to map that back the a sqa DateTime type. Why?

Re: [sqlalchemy] how can i generate IS NOT True instead of != True ( orm ) ?

2012-08-10 Thread Michael Bayer
On Aug 10, 2012, at 3:24 PM, Jonathan Vanasco wrote: in postgresql i have a boolean field that allows Null values. i'd like to query for the items that are not 'true' filter( tablename.is_deleted != True ) creates this sql: is_deleted != True however this is incorrect and

Re: [sqlalchemy] Determining sqa type from dialect type

2012-08-10 Thread Warwick Prince
Hi Michel Thanks! I knew it was in there somewhere! :-) Cheers Warwick Hi All If I have a Column() object, is there a way of determining the sqlalchemy type from the dialect specific type? e.g. I have a Postgres TIMESTAMP column, and I want to be able to map that back the a sqa