]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
alter the collation of string type for collate()
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Jul 2024 13:30:10 +0000 (09:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 6 Jul 2024 20:02:34 +0000 (16:02 -0400)
commit35c178c405c44798810ceac540faf8385b4632c4
treefdc19dfb3a0800066065d7fef468f04be2269229
parent37b20999a3f822090796d973febb78597f4707c0
alter the collation of string type for collate()

Fixed issue where the :func:`_sql.collate` construct, which explicitly sets
a collation for a given expression, would maintain collation settings for
the underlying type object from the expression, causing SQL expressions to
have both collations stated at once when used in further expressions for
specific dialects that render explicit type casts, such as that of asyncpg.
The :func:`_sql.collate` construct now assigns its own type to explicitly
include the new collation, assuming it's a string type.

Fixes: #11576
Change-Id: I6fc8904d2bcbc21f11bbca57e4a451ed0edbd879
doc/build/changelog/unreleased_20/11576.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
test/sql/test_types.py