]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
implement icontains, istartswith, iendswith operators
authorMatias Martinez Rebori <matias.martinez@dinapi.gov.py>
Wed, 7 Sep 2022 16:36:06 +0000 (12:36 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Sep 2022 16:15:23 +0000 (12:15 -0400)
commit93aaf16727f1750d74df1f37b86fcbc7f4a8b139
treef9c7f122e7851ea7be00d52f4de5ef7575f0d4c2
parent06fe424256a80b91e9ff87b3bbe12ea93bc59453
implement icontains, istartswith, iendswith operators

Added long-requested case-insensitive string operators
:meth:`_sql.ColumnOperators.icontains`,
:meth:`_sql.ColumnOperators.istartswith`,
:meth:`_sql.ColumnOperators.iendswith`, which produce case-insensitive
LIKE compositions (using ILIKE on PostgreSQL, and the LOWER() function on
all other backends) to complement the existing LIKE composition operators
:meth:`_sql.ColumnOperators.contains`,
:meth:`_sql.ColumnOperators.startswith`, etc. Huge thanks to Matias
Martinez Rebori for their meticulous and complete efforts in implementing
these new methods.

Fixes: #3482
Closes: #8496
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8496
Pull-request-sha: 7287e2c436959fac4fef022f359fcc73d1528211

Change-Id: I9fcdd603716218067547cc92a2b07bd02a2c366b
doc/build/changelog/unreleased_20/3482.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/operators.py
test/sql/test_operators.py