diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/db-api.txt | 6 |
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 |
