Re: [sqlalchemy] low-level commands in 2.0

2022-11-27 Thread Mike Bayer
On Sat, Nov 26, 2022, at 5:28 PM, Zsolt Ero wrote: > Thanks, so far my new project works well in 2.0. My question is that I'm > trying to migrate to the 2.0 style form using this cheetsheet: > > https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage > > So far I

Re: [sqlalchemy] low-level commands in 2.0

2022-11-26 Thread Zsolt Ero
Thanks, so far my new project works well in 2.0. My question is that I'm trying to migrate to the 2.0 style form using this cheetsheet: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage So far I couldn't figure out how to turn this query in to 2.0 style.

Re: [sqlalchemy] low-level commands in 2.0

2022-11-25 Thread Mike Bayer
On Thu, Nov 24, 2022, at 3:24 PM, zsol...@gmail.com wrote: > Hi, > > I'm trying to run low-level commands like DROP DATABASE / CREATE DATABASE, > with psycopg2. > > In 1.3 I used the following: > > with > pg_engine.connect().execution_options(isolation_level="AUTOCOMMIT",autocommit=True) >

[sqlalchemy] low-level commands in 2.0

2022-11-24 Thread zsol...@gmail.com
Hi, I'm trying to run low-level commands like DROP DATABASE / CREATE DATABASE, with psycopg2. In 1.3 I used the following: with pg_engine.connect().execution_options(isolation_level="AUTOCOMMIT",autocommit=True) as conn: conn.execute(command) Now in 2.0 I run into many errors. I've