]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add additional IMV UUID tests, fix pymssql case
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Feb 2024 17:02:19 +0000 (12:02 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Feb 2024 23:15:47 +0000 (18:15 -0500)
commite766aa473f983dfbf926246ec14265220aa97103
treea1820fb216af4f3a905fae364130c90fd8a37204
parent50d0ac28fbdf98c57118caa868f0e51914791567
add additional IMV UUID tests, fix pymssql case

Fixed an issue regarding the use of the :class:`.Uuid` datatype with the
:paramref:`.Uuid.as_uuid` parameter set to False, when using the pymssql
dialect. ORM-optimized INSERT statements (e.g. the "insertmanyvalues"
feature) would not correctly align primary key UUID values for bulk INSERT
statements, resulting in errors.

This change also adds a small degree of generalization to the
Uuid datatype by adding the native/non-native compilation conditional
to the base compiler.

Patch is originally part of Ib920871102b9b64f2cba9697f5cb72b6263e4ed8
which is implementing native UUID for mariadb in 2.1 only.

Change-Id: I96cbec5c0ece312b345206aa5a5db2ffcf732d41
(cherry picked from commit 9b1c9d5d2e2f9a1e83cf80ca5cd834de213e59ea)
doc/build/changelog/unreleased_20/uuid_imv_fixes.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_insert.py
test/sql/test_insert_exec.py