#34168: Add support for list of parameters to the QuerySet.raw().
-------------------------------------+-------------------------------------
Reporter: Marek Rouchal | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => wontfix
Comment:
Thanks for this ticket. It already works on PostgreSQL and MySQL (however
unintentionally) when passing list of tuples, e.g.
{{{#!python
query = "SELECT * FROM raw_query_author WHERE first_name in %s"
params = [("Bill", "Jill")]
Author.objects.raw(query, params=params)
}}}
We don't really want to encourage users to use `raw()` anymore since
almost everything is covered by the ORM, so adding a new feature to raw
queries is always a bit controversial.
Please first start a discussion on the DevelopersMailingList, where you'll
reach a wider audience, and
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features]. Initially "wontfix" from me.
--
Ticket URL: <https://code.djangoproject.com/ticket/34168#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018485e831ff-3d5600aa-2507-4acb-92a0-a6a49a61a88a-000000%40eu-central-1.amazonses.com.