[sqlalchemy] Re: Reconnect while loosing Mysql connection

2012-06-12 Thread Pavel Skvazh
Too obvious or too complicated? On Monday, June 4, 2012 7:10:14 PM UTC+4, Pavel Skvazh wrote: Hi, everyone! Due to an obviously lacking skills of an admin, the connection with Mysql sever is really spotty. And I keep getting OperationalError 'Can't connect to MySQL server' error every

[sqlalchemy] Reconnect while loosing Mysql connection

2012-06-04 Thread Pavel Skvazh
Hi, everyone! Due to an obviously lacking skills of an admin, the connection with Mysql sever is really spotty. And I keep getting OperationalError 'Can't connect to MySQL server' error every once in a while. What's the best practice approach to handle this kind of errors. Logical way would be

[sqlalchemy] Mysql dialects comparison

2010-04-22 Thread Pavel Skvazh
Hi, everybody! Looks like mysql_python is getting some competition lately. Not that there's a lot to complain about it, but having options never heart anybody. I'd be nice to get a grasp of what's the experience people had with official connector and the our_sql (pure python sounds like not a

[sqlalchemy] Re: Textual SQL

2009-02-03 Thread Pavel Skvazh
is configurable print '+ execute() will include commit' session2.execute(insert into something(stuff) values('some more stuff')) On Feb 2, 1:15 pm, Bob Farrell robertanthonyfarr...@googlemail.com wrote: On Mon, Feb 02, 2009 at 09:56:15AM -0800, Pavel Skvazh wrote: Session.execute('INSERT

[sqlalchemy] Textual SQL

2009-02-02 Thread Pavel Skvazh
Session.execute('INSERT INTO SOMETHING SOMETHING / DELETE/ UPDATE') Do I have to call Session.commit() after this or it's already taken care of? In other words does the literal sql statements follow the session transaction rules or they act on there own? And since this works and worked for me

[sqlalchemy] Re: how to print a constructed query with it's parameters?

2008-10-17 Thread Pavel Skvazh
Thanks for the solution! But i get the warning for this query: SELECT address.name AS address_lang, user.name AS user_name FROM addresses LEFT OUTER JOIN user ON user.id = address.user_id Throws sqlalchemy-0.5.0rc2dev_r5150-py2.5.egg\sqlalchemy\sql\expression.py: 1616: SAWarning: Column 'name'

[sqlalchemy] Storing DB engine in session

2007-10-17 Thread Pavel Skvazh
I've been struggling with this problem for a long time now and will appreciate any help. I'm using Oracle and pass users/passwords to access the database. uri = 'oracle://' + config.get('sqlalchemy_conf.webuser', '') + ':' + config.get('sqlalchemy_conf.webpassword', '') + '@' + bd_location

[sqlalchemy] Re: Storing DB engine in session

2007-10-17 Thread Pavel Skvazh
Thanks a lot, Paul. Great point, works just great. That pretty much solved the issue. log_dic log_typle = (session['login'], session['password']) if not log_dic.has_key((log_typle)): engine = create_engine(uri) log_dic[log_typle] = engine

[sqlalchemy] Oracle sequences issue

2007-08-14 Thread Pavel Skvazh
I'm trying to make sequences in the Oracle database. Here's my model def init(): #conf = paste.deploy.CONFIG #uri = conf['sqlalchemy.dburi'] if 'login' in session: uri=1 else: conf = paste.deploy.CONFIG uri =

[sqlalchemy] Oracle sequences issue

2007-08-14 Thread Pavel Skvazh
I'm trying to make sequences in the Oracle database. Here's my model def init(): #conf = paste.deploy.CONFIG #uri = conf['sqlalchemy.dburi'] if 'login' in session: uri=1 else: conf = paste.deploy.CONFIG uri =