]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Deprecate create_engine.implicit_returning
authorjonathan vanasco <jonathan@2xlp.com>
Mon, 27 Sep 2021 19:15:33 +0000 (15:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Nov 2021 16:34:48 +0000 (11:34 -0500)
commitb2df5be7ee8b5ee7ae67323b5018ca37bbf0ce2a
tree2abd440bff67b013bae396dd697a1e2f10fe0b17
parentcf404d840c15fe167518dd884b295dc99ee26178
Deprecate create_engine.implicit_returning

The :paramref:`_sa.create_engine.implicit_returning` parameter is
deprecated on the :func:`_sa.create_engine` function only; the parameter
remains available on the :class:`_schema.Table` object. This parameter was
originally intended to enable the "implicit returning" feature of
SQLAlchemy when it was first developed and was not enabled by default.
Under modern use, there's no reason this parameter should be disabled, and
it has been observed to cause confusion as it degrades performance and
makes it more difficult for the ORM to retrieve recently inserted server
defaults. The parameter remains available on :class:`_schema.Table` to
specifically suit database-level edge cases which make RETURNING
infeasible, the sole example currently being SQL Server's limitation that
INSERT RETURNING may not be used on a table that has INSERT triggers on it.

Also removed from the Oracle dialect some logic that would upgrade
an Oracle 8/8i server version to use implicit returning if the
parameter were explictly passed; these versions of Oracle
still support RETURNING so the feature is now enabled for all
Oracle versions.

Fixes: #6962
Change-Id: Ib338e300cd7c8026c3083043f645084a8211aed8
18 files changed:
doc/build/changelog/unreleased_20/6962.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/engine/create.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/testing/assertsql.py
lib/sqlalchemy/testing/suite/test_insert.py
test/dialect/mssql/test_types.py
test/dialect/oracle/test_dialect.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_dialect.py
test/dialect/postgresql/test_query.py
test/engine/test_deprecations.py
test/engine/test_execute.py
test/requirements.py
test/sql/test_defaults.py
test/sql/test_insert_exec.py
test/sql/test_returning.py
test/sql/test_sequences.py