public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniele Varrazzo <[email protected]>
To: Denis Laxalde <[email protected]>
Cc: [email protected]
Subject: Re: Executing on the connection?
Date: Tue, 8 Dec 2020 14:56:14 +0000
Message-ID: <CA+mi_8YgOjGA3P9sBY4nVsE=_f6BbCi3OE-ZPz=LZoP5yEtedA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+mi_8Yc92bX3qhTqXq4LkGyn5VmQj6uRAcVebpqt398Tm4EJA@mail.gmail.com>
	<CA+mi_8Y+fuzZcT+boRwcQKPd58B=bc324MA2=TAd6xuAvfuMmw@mail.gmail.com>
	<[email protected]>

On Tue, 8 Dec 2020 at 13:51, Denis Laxalde <[email protected]> wrote:

> It did not strike me earlier, but it looks a bit weird to have
> connection.execute() return a "cursor" to read results while this
> "cursor" can also be used to execute commands. So, perhaps, another
> object, with only the interface for result retrieval would be more
> appropriate?

It thought about that, and it would be weird if people used a cursor
for further queries after consuming it, yes. But hey, who are we to
deny them to do that? :D I wouldn't go about creating and maintaining
new objects and interfaces only to limit the possibility.

My idea is that those who are interested in using `conn.execute()` are
exactly the people who don't care about having execute() on a cursor.
I think there's no harm in leaving it there :)

-- Daniele





view thread (13+ messages)

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], [email protected]
  Subject: Re: Executing on the connection?
  In-Reply-To: <CA+mi_8YgOjGA3P9sBY4nVsE=_f6BbCi3OE-ZPz=LZoP5yEtedA@mail.gmail.com>

* 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