#7907: tables argument of QuerySet.extra should be allow a subquery.
---------------------------------------------+------------------------------
Reporter: bear330 | Owner: nobody
Status: new | Milestone:
Component: Database wrapper | Version: SVN
Resolution: | Keywords: queryset, extra,
qn, subquery, post-qsrf
Stage: Design decision needed | Has_patch: 1
Needs_docs: 1 | Needs_tests: 1
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Changes (by sciyoshi):
* cc: [EMAIL PROTECTED] (added)
* component: Core framework => Database wrapper
* needs_tests: 0 => 1
* keywords: queryset, extra, qn, subquery => queryset, extra, qn,
subquery, post-qsrf
* needs_docs: 0 => 1
* has_patch: 0 => 1
Comment:
Attaching a patch for one possible solution: allow the `tables` argument
to be a dictionary-like object mapping table names to subqueries, where
the subquery is not quoted. Your example could therefore be re-written as
{{{
queryset.extra(tables={
'k': '(select * from table)'
})
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/7907#comment:2>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---