#17600: Error in encapsulates filters (Q)
-------------------------------------+-------------------------------------
Reporter: pmartin | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.3
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akaariai):
* stage: Accepted => Ready for checkin
Comment:
I have rebased the
https://github.com/akaariai/django/tree/refactor_utils_tree and done some
additions, too. The biggest one is that we now have build_filter() instead
of add_filter() which will create a WhereNode object ready to be added to
the tree. By doing this the wherenode/havingnode additions suddenly happen
naturally in the _add_q without the need to pass the target clause down to
add_filter. I like this way.
There is also a new add_filter() which is just
self.where.add(self.build_filter(filterexpr), AND) - that is, a little
helper which is used in various places of the ORM.
--
Ticket URL: <https://code.djangoproject.com/ticket/17600#comment:25>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.