[sqlalchemy] Re: intersect_all vs chaining of filter

2011-07-14 Thread Eduardo
Then what is the purpose of the intersection method? It looks to me as a (bad) alternative to chained filtering!! Can you think of any case when intersection is better choice than filters? On Jun 23, 4:08 am, Mike Conley mconl...@gmail.com wrote: On Tue, Jun 21, 2011 at 6:05 AM, Eduardo

[sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread Eduardo
When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information regarding the failure!) On Jul 14, 10:16 am, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote On Jul

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote On Jul 13, 7:11 pm, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote Hi, I am trying to prompt an answer from a database after failed create_engine command. I searched through the source code and I found TypeError, and ValueError returns but

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information regarding the failure!) Try turning on SQL logging (either by passing echo='debug') to create_engine, or by

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information regarding the failure!) Try turning on SQL logging (either by passing echo='debug') to create_engine, or by

[sqlalchemy] SQL Server weird sorting behaviour

2011-07-14 Thread Massi
Hi everyone, I'm using sqlalchemy 0.6.8 to interact with an sql server database via pyodbc. I'm getting in troubles using the 'order by' clause on a varchar column which include positive or negative integer values. When I try to get values from this column ordered in ascending mode I get: 1 -1 11

[sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread Eduardo
My application only queries the database there are no inputs and therefore no transactions involved. On Jul 14, 10:49 am, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote: On Jul 14, 10:49 am, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information

[sqlalchemy] Oracle Connection Oddities

2011-07-14 Thread Burhan
Platform: Windows XP Oracle : 10.2.0.4.0 SQLAlchemy: 0.7 Python: 2.7 Driver: cx_Oracle (compiled with unicode support as per the Windows binary) My problem is that when I try to do introspection, sqla refuses to connect with this error: cursor.execute(SELECT 0.1 FROM DUAL) TypeError: expecting

[sqlalchemy] Alter a Sequence after creation...

2011-07-14 Thread Christian Klinger
Hi, i try to alter Sequence after this Sequence is created. I guess the sqlalchemy event system is the place where i should look. I tried this one with no succes... from sqlalchemy import event from sqlalchemy import DDL from sqlalchemy import * from sqlalchemy.ext.declarative import

Re: [sqlalchemy] Oracle Connection Oddities

2011-07-14 Thread Michael Bayer
Burhan wrote: Platform: Windows XP Oracle : 10.2.0.4.0 SQLAlchemy: 0.7 Python: 2.7 Driver: cx_Oracle (compiled with unicode support as per the Windows binary) What version is in use here? Is the unicode support as per the Windows binary you refer to cx_oracle's UNICODE mode (im

Re: [sqlalchemy] Oracle Connection Oddities

2011-07-14 Thread Burhan
Thanks Michael for the reply. I am not sure what version of cx_Oracle it is - it was downloaded as a Windows binary - the latest version is 5.1 on the cx_Oracle download page. I did manage to solve the other problem though, but I don't know why I needed a fix. In the vanilla cx_Oracle code, I

Re: [sqlalchemy] Oracle Connection Oddities

2011-07-14 Thread Ian Kelly
On Thu, Jul 14, 2011 at 12:53 PM, Burhan burhan.kha...@gmail.com wrote: I am not sure what version of cx_Oracle it is - it was downloaded as a Windows binary - the latest version is 5.1 on the cx_Oracle download page. import cx_Oracle print cx_Oracle.version -- You received this message

[sqlalchemy] Re: setting collection backref during merge()

2011-07-14 Thread Kent
I was considering the one side of a many to one, where setting the backref would be trivial during merge since we already have the object and know what it is. However, I see how that would be inconsistent ... why does the orm set this only in one direction? would be the question. Anyway, 95% of

Re: [sqlalchemy] Re: setting collection backref during merge()

2011-07-14 Thread Michael Bayer
Kent wrote: I was considering the one side of a many to one, where setting the backref would be trivial during merge since we already have the object and know what it is. However, I see how that would be inconsistent ... why does the orm set this only in one direction? would be the question.

Re: [sqlalchemy] Re: intersect_all vs chaining of filter

2011-07-14 Thread Michael Bayer
a moment of googling, INTERSECT is when you'd like to find the exact intersection of rows, including NULLs being compared: http://sqltips.wordpress.com/2007/08/15/difference-between-inner-join-and-intersect/ INTERSECT is an uncommon operator. Eduardo wrote: Then what is the purpose of the

Re: [sqlalchemy] Alter a Sequence after creation...

2011-07-14 Thread Michael Bayer
Christian Klinger wrote: Hi, i try to alter Sequence after this Sequence is created. I guess the sqlalchemy event system is the place where i should look. I tried this one with no succes... from sqlalchemy import event from sqlalchemy import DDL from sqlalchemy import * from

[sqlalchemy] Re: PostgreSQL 9.1 on the horizon, cool new stuff

2011-07-14 Thread Eric Ongerth
Not that anyone actually needed it, but it was fun to filter and summarize. (caffeine sink) On Jul 11, 11:41 pm, Warwick Prince warwi...@mushroomsys.com wrote: Thanks for the 'heads-up' Eric :-) ! Nothing to see here, move right along ! Except... Couple of interesting additions

[sqlalchemy] Re: SQL Server weird sorting behaviour

2011-07-14 Thread Eric Ongerth
Sounds like you might want to set a different collation? I don't know if sql server lets you do that per column, per table, or just per database. http://msdn.microsoft.com/en-us/library/ms144250.aspx --- some collation examples On Jul 14, 4:51 am, Massi massi_...@msn.com wrote: Hi everyone,

Re: [sqlalchemy] Re: SQL Server weird sorting behaviour

2011-07-14 Thread Michael Bayer
or CAST the column as int more likely http://msdn.microsoft.com/en-us/library/aa226054%28v=sql.80%29.aspx SQLA's construct: http://www.sqlalchemy.org/docs/core/expression_api.html?highlight=cast#sqlalchemy.sql.expression.cast On Jul 14, 2011, at 7:19 PM, Eric Ongerth wrote: Sounds like you