mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Support 'pyformat' style parameters in raw queries, Refs #10070
Add support for Oracle, fix an issue with the repr of RawQuerySet, add tests and documentations. Also added a 'supports_paramstyle_pyformat' database feature, True by default, False for SQLite. Thanks Donald Stufft for review of documentation.
This commit is contained in:
parent
7c0b72a826
commit
d097417025
9 changed files with 147 additions and 34 deletions
|
@ -623,6 +623,14 @@ If you're getting this error, you can solve it by:
|
|||
SQLite does not support the ``SELECT ... FOR UPDATE`` syntax. Calling it will
|
||||
have no effect.
|
||||
|
||||
"pyformat" parameter style in raw queries not supported
|
||||
-------------------------------------------------------
|
||||
|
||||
For most backends, raw queries (``Manager.raw()`` or ``cursor.execute()``)
|
||||
can use the "pyformat" parameter style, where placeholders in the query
|
||||
are given as ``'%(name)s'`` and the parameters are passed as a dictionary
|
||||
rather than a list. SQLite does not support this.
|
||||
|
||||
.. _sqlite-connection-queries:
|
||||
|
||||
Parameters not quoted in ``connection.queries``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue