public inbox for [email protected]
help / color / mirror / Atom feedFrom: Karsten Hilbert <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: Executing on the connection?
Date: Wed, 2 Dec 2020 17:23:01 +0100
Message-ID: <X8e/[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+mi_8Yc92bX3qhTqXq4LkGyn5VmQj6uRAcVebpqt398Tm4EJA@mail.gmail.com>
<[email protected]>
> > 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
view thread (13+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Executing on the connection?
In-Reply-To: <X8e/[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox