#23878: Query object/expression documentation needs to tidied
--------------------------------------+------------------------------------
Reporter: EvilDMP | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by carljm):
@jarshwah Hmm. The Q documentation says "A Q() object, like an F object,
encapsulates a SQL expression in a Python object that can be used in
database-related operations." That certainly makes it _sound_ like
something that belongs, with F objects, in the documentation about objects
that represent SQL expressions, regardless of common ancestry. I guess
maybe that documentation sentence is technically not quite on point -- a Q
object represents a boolean condition (or tree of boolean conditions),
which are made up of expressions but aren't precisely an expression.
Q does not implement the query expression API
(https://docs.djangoproject.com/en/dev/ref/models/lookups/#the-query-
expression-api). (As an aside, it seems like the general query expression
API documentation might belong in the expressions doc, which seems more
"general", rather than the lookups doc.)
I'm not sure where Q belongs, but it seems to me that between just the
expressions doc and the lookups doc, it would be a better fit in the
expressions doc. Q is very clearly neither a lookup nor a transform, but
it is something that represents a SQL expression (broadly construed).
--
Ticket URL: <https://code.djangoproject.com/ticket/23878#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.2719cfd79c7657e9a24d9ab1e9537924%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.