From ad8faa7e94f7dca522e2419c3a1c8c1503461745 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 27 Apr 2006 22:10:08 +0000 Subject: [PATCH] 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 --- docs/db-api.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/db-api.txt b/docs/db-api.txt index ec0fbb6554..28bd236fe5 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -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