#10070: Named parameters not working on raw sql queries with sqlite
-------------------------------------+-------------------------------------
Reporter: Matias Surdi | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Charlie DeTar):
I encountered a use case where I wanted to do an upsert query (`INSERT ...
ON CONFLICT DO UPDATE SET ...`). This is raw SQL that is not supported by
the ORM, but has consistent syntax between sqlite and postgresql. I ran
into this trouble with named parameters. The query syntax itself worked
for both backends, but the parameter naming syntax did not. I worked
around this by just using positional arguments instead -- but there are
valid needs for raw SQL targeting more than one database backend, and
consistent named parameter syntax would be useful.
--
Ticket URL: <https://code.djangoproject.com/ticket/10070#comment:20>
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/064.c5e7c1cc8aed7fe69a8c146aa153385d%40djangoproject.com.