> On Dec 2, 2020, at 03:20, Daniele Varrazzo <daniele.varra...@gmail.com> wrote: > One little change I've made to psycopg3 cursors is to make it return > "self" on execute() (it currently returns None, so it's totally > unused). Very nice! > As a result people could use: > > conn = psycopg3.connect(dsn) > record = conn.execute(query, params).fetchone() > # or > for record in conn.execute(query, params): > ... # do something +1. I think it would be a handy addition. -- -- Christophe Pettus x...@thebuild.com
- Executing on the connection? Daniele Varrazzo
- Re: Executing on the connection? Christophe Pettus
- Re: Executing on the connection? Karsten Hilbert
- Re: Executing on the connection? Rory Campbell-Lange
- Re: Executing on the connection? Daniele Varrazzo
- Re: Executing on the connection? Marco Beri
- Re: Executing on the connection? Vladimir Ryabtsev
- Re: Executing on the connection? Adrian Klaver
- Re: Executing on the connection? Daniele Varrazzo
- Re: Executing on the connection? Daniele Varrazzo
- Re: Executing on the connection? Denis Laxalde
- Re: Executing on the connection? Adrian Klaver