summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-17 20:07:59 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-17 20:07:59 +0000
commit2c4b13cbe7477a7f94f11fa23e39033b005a3b88 (patch)
tree1f3f1484c5c60178d8d601e93c17f052b333ea58 /docs
parentc92b424e5766c0d5b883b59ea3329d84e54b3c9a (diff)
Changed the (internal) way extra(select=.., select_params=...) handling is done
so that parameters stay with their select items. This means that merging and trimming of those items is handled correctly. Refs #7957, #7961. Fixed #8191. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8426 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/db-api.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 3c97de3ca6..77a29cc8a5 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -1014,6 +1014,12 @@ of the arguments is required, but you should use at least one of them.
select=SortedDict(('a', '%s'), ('b', '%s')),
select_params=('one', 'two'))
+ The only thing to be careful about when using select parameters in
+ ``extra()`` is to avoid using the substring ``"%%s"`` (that's *two*
+ percent characters before the ``s``) in the select strings. Django's
+ tracking of parameters looks for ``%s`` and an escaped ``%`` character
+ like this isn't detected. That will lead to incorrect results.
+
``where`` / ``tables``
You can define explicit SQL ``WHERE`` clauses -- perhaps to perform
non-explicit joins -- by using ``where``. You can manually add tables to