mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
magic-removal: Small improvement to docs/db-api.txt
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
dd184fb06e
commit
ad8faa7e94
@ -1035,11 +1035,12 @@ equivalent::
|
||||
Escaping parenthesis and underscores in LIKE statements
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The field lookups that equate to ``LIKE`` SQL statements will automatically
|
||||
escape the two special characters used in ``LIKE`` statements -- the percent
|
||||
sign and the underscore. (In a ``LIKE`` statement, the percent sign signifies
|
||||
a multiple-character wildcard and the underscore signifies a single-character
|
||||
wildcard.)
|
||||
The field lookups that equate to ``LIKE`` SQL statements (``iexact``,
|
||||
``contains``, ``icontains``, ``startswith``, ``istartswith``, ``endswith``
|
||||
and ``iendswith``) will automatically escape the two special characters used in
|
||||
``LIKE`` statements -- the percent sign and the underscore. (In a ``LIKE``
|
||||
statement, the percent sign signifies a multiple-character wildcard and the
|
||||
underscore signifies a single-character wildcard.)
|
||||
|
||||
This means things should work intuitively, so the abstraction doesn't leak.
|
||||
For example, to retrieve all the entries that contain a percent sign, just use
|
||||
|
Loading…
x
Reference in New Issue
Block a user