mirror of https://github.com/django/django.git
Made a few queryset lookup examples consistent.
This commit is contained in:
parent
e4025563ea
commit
b427f0d674
|
@ -2544,11 +2544,11 @@ Case-sensitive starts-with.
|
|||
|
||||
Example::
|
||||
|
||||
Entry.objects.filter(headline__startswith='Will')
|
||||
Entry.objects.filter(headline__startswith='Lennon')
|
||||
|
||||
SQL equivalent::
|
||||
|
||||
SELECT ... WHERE headline LIKE 'Will%';
|
||||
SELECT ... WHERE headline LIKE 'Lennon%';
|
||||
|
||||
SQLite doesn't support case-sensitive ``LIKE`` statements; ``startswith`` acts
|
||||
like ``istartswith`` for SQLite.
|
||||
|
@ -2562,11 +2562,11 @@ Case-insensitive starts-with.
|
|||
|
||||
Example::
|
||||
|
||||
Entry.objects.filter(headline__istartswith='will')
|
||||
Entry.objects.filter(headline__istartswith='Lennon')
|
||||
|
||||
SQL equivalent::
|
||||
|
||||
SELECT ... WHERE headline ILIKE 'Will%';
|
||||
SELECT ... WHERE headline ILIKE 'Lennon%';
|
||||
|
||||
.. admonition:: SQLite users
|
||||
|
||||
|
@ -2582,11 +2582,11 @@ Case-sensitive ends-with.
|
|||
|
||||
Example::
|
||||
|
||||
Entry.objects.filter(headline__endswith='cats')
|
||||
Entry.objects.filter(headline__endswith='Lennon')
|
||||
|
||||
SQL equivalent::
|
||||
|
||||
SELECT ... WHERE headline LIKE '%cats';
|
||||
SELECT ... WHERE headline LIKE '%Lennon';
|
||||
|
||||
.. admonition:: SQLite users
|
||||
|
||||
|
@ -2603,11 +2603,11 @@ Case-insensitive ends-with.
|
|||
|
||||
Example::
|
||||
|
||||
Entry.objects.filter(headline__iendswith='will')
|
||||
Entry.objects.filter(headline__iendswith='Lennon')
|
||||
|
||||
SQL equivalent::
|
||||
|
||||
SELECT ... WHERE headline ILIKE '%will'
|
||||
SELECT ... WHERE headline ILIKE '%Lennon'
|
||||
|
||||
.. admonition:: SQLite users
|
||||
|
||||
|
|
Loading…
Reference in New Issue