]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support GenericFunction.name passed as a quoted_name
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Jan 2020 19:09:01 +0000 (14:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Jan 2020 19:13:28 +0000 (14:13 -0500)
commit602351c4c3fd3d9ce66869866b7e21cfed1cf117
treed394ce9a8f57b08e21180b465a0c8ea38466bf78
parentc084911c665d851177424993bbe9258d84ba64f3
Support GenericFunction.name passed as a quoted_name

A function created using :class:`.GenericFunction` can now specify that the
name of the function should be rendered with or without quotes by assigning
the :class:`.quoted_name` construct to the .name element of the object.
Prior to 1.3.4, quoting was never applied to function names, and some
quoting was introduced in :ticket:`4467` but no means to force quoting for
a mixed case name was available.  Additionally, the :class:`.quoted_name`
construct when used as the name will properly register its lowercase name
in the function registry so that the name continues to be available via the
``func.`` registry.

Fixes: #5079
Change-Id: I0653ab8b16e75e628ce82dbbc3d0f77f8336c407
(cherry picked from commit a697fcc1cb87b5a4e4f0c70361bd598086f4210f)
doc/build/changelog/unreleased_13/5079.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/functions.py
test/sql/test_functions.py