Re: [sqlalchemy] MySQL has gone away

2013-01-07 Thread Diego Woitasen
On Thursday, December 27, 2012 10:22:08 PM UTC-3, Michael Bayer wrote: On Dec 27, 2012, at 6:28 PM, Diego Woitasen wrote: Hi, I know that this was discussed several times in the past but I can't solve the problem with the tip that I read in this list. Every morning my application dies

[sqlalchemy] MySQL has gone away

2012-12-27 Thread Diego Woitasen
Hi, I know that this was discussed several times in the past but I can't solve the problem with the tip that I read in this list. Every morning my application dies with the msg MySQL has gone away. My app has different modules (which are process) and this errors appears in the simplest one and

[sqlalchemy] Can't find any foreign key relationships between ...

2012-12-04 Thread Diego Woitasen
Hi, I have the following tables: rcpt_group_asoc = Table(mailing_rcptgroup_rcpts, Base.metadata, Column('rcpt_id', Integer, ForeignKey('mailing_rcpt.id')), Column('rcptgroup_id', Integer, ForeignKey('mailing_rcptgroup.id'))) class Rcpt(Base): __tablename__

Re: [sqlalchemy] Can't find any foreign key relationships between ...

2012-12-04 Thread Diego Woitasen
On Tuesday, December 4, 2012 5:12:51 PM UTC-3, Michael Bayer wrote: On Dec 4, 2012, at 2:30 PM, Diego Woitasen wrote: Hi, I have the following tables: rcpt_group_asoc = Table(mailing_rcptgroup_rcpts, Base.metadata, Column('rcpt_id', Integer, ForeignKey

[sqlalchemy] InsertFromSelect with columns support

2012-11-24 Thread Diego Woitasen
Hi, This is working version of InsertFromSelect with columns support. Works for me, but I could be useful for somebody else. And also I want to heart other opinions about this. In SQL there is no way to do an INSERT... SELECT. If you want to do it without using raw SQL in several places of

[sqlalchemy] SQLA app and Django app using the same database

2012-10-26 Thread Diego Woitasen
Hi, I'm developing an application that access a DB that is defined and mainly manipulated by a Django application. My app works in the backend processing the data, using SQLA. My question is. Is there a problem in a scenario like this? I mean, two different applications with different ORMs

Re: [sqlalchemy] Re: Sqlsoup: slow commit on update

2010-12-21 Thread Diego Woitasen
, Diego Woitasen dieg...@xtech.com.ar wrote: On Tue, Dec 21, 2010 at 12:35 AM, Diego Woitasen dieg...@xtech.com.ar dieg...@xtech.com.ar wrote: Hi, I have a python script that uses Sqlsoup to iterate over some rows of table to modify them. The script is running really slow and I ran cProfile

[sqlalchemy] Sqlsoup: slow commit on update

2010-12-20 Thread Diego Woitasen
sqlsoup.py:549(__getattr__) 5040.0030.0003.1380.006 sqlsoup.py:535(entity) The problem is commit, almost all the time used by the script is on commit. Is there a faster way to modify every row? Or Should i use raw sql? Regards, Diego -- Diego Woitasen XTECH -- You received

[sqlalchemy] Re: Sqlsoup: slow commit on update

2010-12-20 Thread Diego Woitasen
On Tue, Dec 21, 2010 at 12:35 AM, Diego Woitasen dieg...@xtech.com.arwrote: Hi, I have a python script that uses Sqlsoup to iterate over some rows of table to modify them. The script is running really slow and I ran cProfile to see where is the bottleneck. I've got this: 20549870

Re: [sqlalchemy] SQL IF in sqlalchemy?

2009-11-29 Thread Diego Woitasen
2009/11/28 Michael Bayer mike...@zzzcomputing.com: we support CASE via case() which will get you there just as well. On Nov 28, 2009, at 1:54 PM, Diego Woitasen wrote: Does sqlalchemy support SQL IF? For example: select date, if(proxy_user_id 1, count(distinct address_id), 0) from table

[sqlalchemy] SQL IF in sqlalchemy?

2009-11-28 Thread Diego Woitasen
Does sqlalchemy support SQL IF? For example: select date, if(proxy_user_id 1, count(distinct address_id), 0) from table group by date; I've solved this using literal SQL in Query() parameters but may be I can do it using ORM. -- Diego Woitasen XTECH -- You received this message because you

[sqlalchemy] Simple join

2009-10-07 Thread Diego Woitasen
== 'foo').all() but It's too complex. Is there an easier way? Something like: DBSession.query(WorkStation).filter(Workstation.server.label == 'foo').all() Thanks! -- Diego Woitasen XTECH --~--~-~--~~~---~--~~ You received this message because you are subscribed