Opened 4 months ago

Last modified 4 months ago

#36391 assigned Cleanup/optimization

Document RawSQL on “Performing raw SQL queries” page

Reported by: Adam Johnson Owned by: shin wo jin
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

#25212 documented the `RawSQL` expression class. However, it didn’t add a mention to `topics/db/sql.txt`, “Performing raw SQL queries”, which lists the “two ways” Django gives users to perform raw SQL queries.

RawSQL represents a third way, although it is only usable for subqueries of a non-raw QuerySet query, so I believe it deserves a mention on that page too.

Change History (6)

comment:1 by Adam Johnson, 4 months ago

Easy pickings: set

comment:2 by Natalia Bidart, 4 months ago

Triage Stage: UnreviewedAccepted

Hello Adam, thank you for your ticket! This makes sense, accepting.

comment:3 by shin wo jin, 4 months ago

Has patch: set
Owner: set to shin wo jin
Status: newassigned

comment:4 by Sarah Boyce, 4 months ago

Has patch: unset

comment:5 by shin wo jin, 4 months ago

Has patch: set

The documentation for using RawSQL in ORM expressions has been added in PR(https://github.com/django/django/pull/19475)
This should resolve the issue described in this ticket.

Thank you!

comment:6 by Adam Johnson, 4 months ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top