1
0
mirror of https://github.com/django/django.git synced 2025-07-05 02:09: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:
Adrian Holovaty 2006-04-27 22:10:08 +00:00
parent dd184fb06e
commit ad8faa7e94

View File

@ -1035,11 +1035,12 @@ equivalent::
Escaping parenthesis and underscores in LIKE statements Escaping parenthesis and underscores in LIKE statements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The field lookups that equate to ``LIKE`` SQL statements will automatically The field lookups that equate to ``LIKE`` SQL statements (``iexact``,
escape the two special characters used in ``LIKE`` statements -- the percent ``contains``, ``icontains``, ``startswith``, ``istartswith``, ``endswith``
sign and the underscore. (In a ``LIKE`` statement, the percent sign signifies and ``iendswith``) will automatically escape the two special characters used in
a multiple-character wildcard and the underscore signifies a single-character ``LIKE`` statements -- the percent sign and the underscore. (In a ``LIKE``
wildcard.) 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. 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 For example, to retrieve all the entries that contain a percent sign, just use