]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
make bind escape lookup extensible
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Dec 2022 17:56:21 +0000 (12:56 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Dec 2022 18:37:40 +0000 (13:37 -0500)
commitd7107641c309e0b7db9b0876ac048dbb38316ba6
tree747b5ced1c33b1f8eb2da82b534e7159aa979270
parent5bb48511a126b66ed06abf76d706ab707afafbf1
make bind escape lookup extensible

To accommodate for third party dialects with different character escaping
needs regarding bound parameters, the system by which SQLAlchemy "escapes"
(i.e., replaces with another character in its place) special characters in
bound parameter names has been made extensible for third party dialects,
using the :attr:`.SQLCompiler.bindname_escape_chars` dictionary which can
be overridden at the class declaration level on any :class:`.SQLCompiler`
subclass. As part of this change, also added the dot ``"."`` as a default
"escaped" character.

Fixes: #8994
Change-Id: I52fbbfa8c64497b123f57327113df3f022bd1419
doc/build/changelog/unreleased_20/8994.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/sql/compiler.py
test/sql/test_compiler.py