]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Make comment support conditional on fn_listextendedproperty availability
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 25 Jan 2023 13:58:03 +0000 (08:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 25 Jan 2023 14:18:10 +0000 (09:18 -0500)
commitb710a5286310710d5d0a6d5170696e8fe4d4a0d8
tree2e0980513d4728f1308267f36d1cdccc5793e7a5
parent55b243a3f22f267c829f9088fd4e801f0b621a31
Make comment support conditional on fn_listextendedproperty availability

The newly added comment reflection and rendering capability of the MSSQL
dialect, added in :ticket:`7844`, will now be disabled by default if it
cannot be determined that an unsupported backend such as Azure Synapse may
be in use; this backend does not support table and column comments and does
not support the SQL Server routines in use to generate them as well as to
reflect them. A new parameter ``supports_comments`` is added to the dialect
which defaults to ``None``, indicating that comment support should be
auto-detected. When set to ``True`` or ``False``, the comment support is
either enabled or disabled unconditionally.

Fixes: #9142
Change-Id: Ib5cac31806185e7353e15b3d83b580652d304b3b
doc/build/changelog/unreleased_20/9142.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_engine.py
test/dialect/mssql/test_reflection.py