:tags: bug, engine, regression
:tickets: 8717
- Fixed issue where the :meth:`.PoolEvents.reset` event hook would not be
- be called in all cases when a :class:`.Connection` were closed and was
+ Fixed issue where the :meth:`.PoolEvents.reset` event hook would not be be
+ called in all cases when a :class:`_engine.Connection` were closed and was
in the process of returning its DBAPI connection to the connection pool.
- The scenario was when the :class:`.Connection` had already emitted
- ``.rollback()`` on its DBAPI connection within the process of returning
- the connection to the pool, where it would then instruct the connection
- pool to forego doing its own "reset" to save on the additional method
- call. However, this prevented custom pool reset schemes from being
- used within this hook, as such hooks by definition are doing more than
- just calling ``.rollback()``, and need to be invoked under all
- circumstances This was a regression that appeared in version 1.4.
+ The scenario was when the :class:`_engine.Connection` had already emitted
+ ``.rollback()`` on its DBAPI connection within the process of returning the
+ connection to the pool, where it would then instruct the connection pool to
+ forego doing its own "reset" to save on the additional method call.
+ However, this prevented custom pool reset schemes from being used within
+ this hook, as such hooks by definition are doing more than just calling
+ ``.rollback()``, and need to be invoked under all circumstances This was a
+ regression that appeared in version 1.4.
For version 1.4, the :meth:`.PoolEvents.checkin` remains viable as an
alternate event hook to use for custom "reset" implementations. Version 2.0
:paramref:`.MetaData.schema` setting on the :class:`.MetaData` in use;
see :ref:`sequence_metadata` for background.
-When :class:`.Insert` DML constructs are invoked against the ``cartitems``
+When :class:`_dml .Insert` DML constructs are invoked against the ``cartitems``
table, without an explicit value passed for the ``cart_id`` column, the
``cart_id_seq`` sequence will be used to generate a value on participating
backends. Typically, the sequence function is embedded in the INSERT statement,
VALUES (next_val(cart_id_seq), 'some description', '2015-10-15 12:00:15')
RETURNING cart_id
-When using :meth:`.Connection.execute` to invoke an :class:`.Insert` construct,
-newly generated primary key identifiers, including but not limited to those
-generated using :class:`.Sequence`, are available from the :class:`.CursorResult`
-construct using the :attr:`.CursorResult.inserted_primary_key` attribute.
+When using :meth:`_engine.Connection.execute` to invoke an :class:`_dml.Insert`
+construct, newly generated primary key identifiers, including but not limited
+to those generated using :class:`.Sequence`, are available from the
+:class:`.CursorResult` construct using the
+:attr:`.CursorResult.inserted_primary_key` attribute.
When the :class:`~sqlalchemy.schema.Sequence` is associated with a
:class:`_schema.Column` as its **Python-side** default generator, the
is also available from :func:`_sa.create_engine` as
:paramref:`_sa.create_engine.pool_reset_on_return`, passing a value of ``None``.
This is illustrated in the example below, in conjunction with the
-:paramref:`.create_engine.isolation_level` parameter setting of
+:paramref:`_sa.create_engine.isolation_level` parameter setting of
``AUTOCOMMIT``::
non_acid_engine = create_engine(