Re: Executing on the connection? - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Executing on the connection?
Date
Msg-id CA+mi_8akt_guKx_Reqrvr_U5tvy8_9qHpUV3TvyO8a4KkJnxfQ@mail.gmail.com
Whole thread Raw
In response to Re: Executing on the connection?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List psycopg
On Wed, 2 Dec 2020 at 15:02, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

> Just to be clear the above(callproc excepted) or some variation of it
> will still be available off the cursor interface, correct?

Yes, that's correct. The cursor remains with the methods it is known
for. This Connection.execute() would only be the moral equivalent of:

    class Connection:
        def execute(self, query, params=None):
            cur = self.cursor()
            cur.execute(query, params)
            return cur

but nothing would be removed from the cursor interface.

-- Daniele



psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Executing on the connection?
Next
From: Karsten Hilbert
Date:
Subject: Re: Executing on the connection?