]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add reflection arguments, engine/conn bind to DeferredReflection.prepare
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 May 2023 02:21:30 +0000 (22:21 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 May 2023 04:13:13 +0000 (00:13 -0400)
commitf1f6b296c559cedf021e3611c293841191f25317
treec6e698a9f9710c345860ef7ca17b0388072f1bb2
parentdfb09c0e424370026220061bbb9f287bdea0eff3
add reflection arguments, engine/conn bind to DeferredReflection.prepare

Improved :meth:`.DeferredReflection.prepare` to accept arbitrary ``**kw``
arguments that are passed to :meth:`_schema.MetaData.reflect`, allowing use
cases such as reflection of views as well as dialect-specific arguments to
be passed. Additionally, modernized the
:paramref:`.DeferredReflection.prepare.bind` argument so that either an
:class:`.Engine` or :class:`.Connection` are accepted as the "bind"
argument.

Fixes: #9828
Change-Id: Ie93cd1147611a92f07d05df8a39052f61ee692f2
doc/build/changelog/unreleased_20/9828.rst [new file with mode: 0644]
lib/sqlalchemy/ext/declarative/extensions.py
test/ext/declarative/test_reflection.py