]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
expand and further generalize bound parameter translate
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Feb 2021 22:13:51 +0000 (17:13 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Feb 2021 15:16:38 +0000 (10:16 -0500)
commit0e1049600dc88f0f52ff23493ca3aff83a87818f
tree3cdb8950179428f7cece60b1ad67ce84c319bd73
parent63f57014ef72eb0a32111777fc006bebf7ce0cc5
expand and further generalize bound parameter translate

Continued with the improvement made as part of :ticket:`5653` to further
support bound parameter names, including those generated against column
names, for names that include colons, parenthesis, and question marks, as
well as improved test support, so that bound parameter names even if they
are auto-derived from column names should have no problem including for
parenthesis in psycopg2's "pyformat" style.

As part of this change, the format used by the asyncpg DBAPI adapter (which
is local to SQLAlchemy's asyncpg diaelct) has been changed from using
"qmark" paramstyle to "format", as there is a standard and internally
supported SQL string escaping style for names that use percent signs with
"format" style (i.e. to double percent signs), as opposed to names that use
question marks with "qmark" style (where an escaping system is not defined
by pep-249 or Python).

Fixes: #5941
Change-Id: Id86f5af81903d7063a8e3505e60df56490f85358
doc/build/changelog/migration_14.rst
doc/build/changelog/unreleased_14/5941.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/testing/suite/test_dialect.py
test/profiles.txt