~cjwatson/storm/case-sensitive-like-helpers

Viewing all changes in revision 566.

  • Committer: Colin Watson
  • Date: 2020-12-07 22:38:36 UTC
  • Revision ID: cjwatson@canonical.com-20201207223836-489rgnkw6v0ru31v
Add optional case_sensitive argument to several Like helpers.

Comparable.startswith, Comparable.endswith, and Comparable.contains_string
are convenience wrappers around Like, but none of them supported the
case_sensitive option which Like supports on PostgreSQL.  This made using
PostgreSQL's ILIKE extension somewhat cumbersome in places: see
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/394702
for a verbose workaround that would be simpler with the aid of this patch
(e.g. `POMsgID.msgid.contains_string(text, case_sensitive=False)`).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: