diff options
| author | Lakshya <lakshya212001@gmail.com> | 2026-02-12 15:05:07 +0530 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-03-03 12:52:50 -0500 |
| commit | 868012c9619b7ff5f08eb32d9e8e9c9a852fd9f8 (patch) | |
| tree | 41f42d09c8f7ca4c379af616d5286e8ff5464641 | |
| parent | 6224764803a3859573a9244d715f0265cc7ecce4 (diff) | |
[6.0.x] Fixed #20775 -- Clarified that SQL for text lookups varies per database.
Backport of 5b939808220fa879942303f4318276668d11b4d9 from main.
| -rw-r--r-- | docs/ref/models/querysets.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 2e60c6e9f2..9a1d30c299 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3234,6 +3234,8 @@ SQL equivalent: SELECT ... WHERE headline LIKE '%Lennon%'; +(The exact SQL syntax varies for each database engine.) + Note this will match the headline ``'Lennon honored today'`` but not ``'lennon honored today'``. @@ -3261,6 +3263,8 @@ SQL equivalent: SELECT ... WHERE headline ILIKE '%Lennon%'; +(The exact SQL syntax varies for each database engine.) + .. admonition:: SQLite users When using the SQLite backend and non-ASCII strings, bear in mind the @@ -3386,6 +3390,8 @@ SQL equivalent: SELECT ... WHERE headline LIKE 'Lennon%'; +(The exact SQL syntax varies for each database engine.) + SQLite doesn't support case-sensitive ``LIKE`` statements; ``startswith`` acts like ``istartswith`` for SQLite. @@ -3406,6 +3412,8 @@ SQL equivalent: SELECT ... WHERE headline ILIKE 'Lennon%'; +(The exact SQL syntax varies for each database engine.) + .. admonition:: SQLite users When using the SQLite backend and non-ASCII strings, bear in mind the @@ -3428,6 +3436,8 @@ SQL equivalent: SELECT ... WHERE headline LIKE '%Lennon'; +(The exact SQL syntax varies for each database engine.) + .. admonition:: SQLite users SQLite doesn't support case-sensitive ``LIKE`` statements; ``endswith`` @@ -3449,7 +3459,9 @@ SQL equivalent: .. code-block:: sql - SELECT ... WHERE headline ILIKE '%Lennon' + SELECT ... WHERE headline ILIKE '%Lennon'; + +(The exact SQL syntax varies for each database engine.) .. admonition:: SQLite users |
