diff options
| author | Caspar Wylie <casparwylie@Caspars-MacBook-Pro.local> | 2023-02-03 09:23:26 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-02-06 11:00:57 -0500 |
| commit | 2a9487fefcc915ae411a8edc48d5203619ed642b (patch) | |
| tree | 451202ef4835e95c215e8f19c31016a70f400358 /lib/sqlalchemy/sql/selectable.py | |
| parent | 0635235090c85e2c1a18676ca49652d2c2094925 (diff) | |
| download | sqlalchemy-2a9487fefcc915ae411a8edc48d5203619ed642b.tar.gz | |
use mysql 8 syntax for ON DUPLICATE KEY UPDATE
Added support for MySQL 8's new ``AS <name> ON DUPLICATE KEY`` syntax when
using :meth:`_mysql.Insert.on_duplicate_key_update`, which is required for
newer versions of MySQL 8 as the previous syntax using ``VALUES()`` now
emits a deprecation warning with those versions. Server version detection
is employed to determine if traditional MariaDB / MySQL < 8 ``VALUES()``
syntax should be used, vs. the newer MySQL 8 required syntax. Pull request
courtesy Caspar Wylie.
Fixes: #8626
Closes: #9210
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9210
Pull-request-sha: 1c8dfbf0b4c439d9ca2c194524c47eb7239ee3c5
Change-Id: I42c463837af06bc15b60c534159804193df07f02
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
0 files changed, 0 insertions, 0 deletions
