Re: Executing on the connection?

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: Executing on the connection?
Дата
Msg-id X8e/Zegyktxee6Az@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: Executing on the connection?  (Christophe Pettus <xof@thebuild.com>)
Список psycopg
> > 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).

+1


> > 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

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Executing on the connection?
Следующее
От: Hagen Finley
Дата:
Сообщение: Handling (None,) Query Results