On Thu, Oct 21, 2021 at 2:00 PM Daniele Varrazzo
wrote:
> On Thu, 21 Oct 2021 at 12:06, Karsten Hilbert
> wrote:
> >
> > > The behaviour of a dbapi connection, without context block, is to just
> close the communication. The fact that this results in a rollback > stems
> only from the behaviour
On Thu, 21 Oct 2021 at 12:06, Karsten Hilbert wrote:
>
> > The behaviour of a dbapi connection, without context block, is to just
> > close the communication. The fact that this results in a rollback > stems
> > only from the behaviour of the server
>
> But that's the whole point? A driver sho
> We are still "using transactions", just with more precise, more explicit*,
> and more flexible* semantics, represented by a context manager.
>
> Rolling back a transaction is possible by raising a Rollback exception
> within a block.
>
> I hope this answers your question but if not please describ
On Thu, 14 Oct 2021, 11:05 Karsten Hilbert, wrote:
> >My conclusion is that the only sane thing to do is:
> >1. Only ever create connections in autocommit mode.
> >2. Only ever use `with connection.transaction()` to control transactions.
> >3. Forget that `connection.commit()` and `connection.rol