Re: Executing on the connection?
| От | Christophe Pettus |
|---|---|
| Тема | Re: Executing on the connection? |
| Дата | |
| Msg-id | 0616EEA0-1551-40C7-BB2A-A0500FE0518C@thebuild.com обсуждение исходный текст |
| Ответ на | Executing on the connection? (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
| Ответы |
Re: Executing on the connection?
|
| Список | psycopg |
> On Dec 2, 2020, at 03:20, Daniele Varrazzo <daniele.varrazzo@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 xof@thebuild.com
В списке psycopg по дате отправления: