Re: [sqlalchemy] how to change a database

2009-12-04 Thread Alex Brasetvik
On Dec 3, 2009, at 13:37 , Peter wrote: Lets suppose I created an engine on database 'foo' and I want to create a database 'bar' and then do my work on 'bar'. What is the recommended way to do this ? Establish a new connection to bar. -- Alex Brasetvik -- You received this message

Re: [sqlalchemy] how to change a database

2009-12-04 Thread Peter
chaouche yacine wrote: Why not create a different engine for that database ? --- On Thu, 12/3/09, Peter vm...@mycircuit.org wrote: Thanks a lot, I guess I still have to abstract away my standard sql behavior .. Peter -- You received this message because you are subscribed to the Google

[sqlalchemy] how to change a database

2009-12-03 Thread Peter
Hi Lets suppose I created an engine on database 'foo' and I want to create a database 'bar' and then do my work on 'bar'. What is the recommended way to do this ? connection.execute('CREATE DATABASE IF NOT EXISTS bar') connection.execute('USE bar') The former command succeeds with a warning (

Re: [sqlalchemy] how to change a database

2009-12-03 Thread chaouche yacine
Why not create a different engine for that database ? --- On Thu, 12/3/09, Peter vm...@mycircuit.org wrote: From: Peter vm...@mycircuit.org Subject: [sqlalchemy] how to change a database To: sqlalchemy@googlegroups.com Date: Thursday, December 3, 2009, 4:37 AM Hi Lets suppose I created