]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add pow operator support
authorFederico Caselli <cfederico87@gmail.com>
Fri, 4 Apr 2025 20:23:31 +0000 (22:23 +0200)
committerMichael Bayer <mike_mp@zzzcomputing.com>
Tue, 22 Apr 2025 15:54:50 +0000 (15:54 +0000)
commit571bb909320b6285fd3839fb52111c241a3ea8c4
tree9ea10912375624559654f7c7d6406160fdb47e85
parent801e1e1982ebc5ecd8d77d46615311c6c7dc9b94
Add pow operator support

Added support for the pow operator (``**``), with a default SQL
implementation of the ``POW()`` function.   On Oracle Database, PostgreSQL
and MSSQL it renders as ``POWER()``.   As part of this change, the operator
routes through a new first class ``func`` member :class:`_functions.pow`,
which renders on Oracle Database, PostgreSQL and MSSQL as ``POWER()``.

Fixes: #8579
Closes: #8580
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8580
Pull-request-sha: 041b2ef474a291c6b6172e49cc6e0d548e28761a

Change-Id: I371bd44ed3e58f2d55ef705aeec7d04710c97f23
13 files changed:
doc/build/changelog/unreleased_21/8579.rst [new file with mode: 0644]
doc/build/core/functions.rst
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/operators.py
test/dialect/mssql/test_compiler.py
test/dialect/oracle/test_compiler.py
test/dialect/postgresql/test_compiler.py
test/sql/test_operators.py
test/typing/plain_files/sql/functions.py