That answers my question. Thanks! Perhaps I'll try to make matched-vs-updated a point of discussion for Django 2.0. As for the other stuff, I'll give consideration to work on save_base and maybe work up a proposal there. -- Steven
On Tue, Jun 26, 2012 at 2:31 AM, Anssi Kääriäinen <anssi.kaariai...@thl.fi>wrote: > On 26 kesä, 08:41, Steven Cummings <estebis...@gmail.com> wrote: > > Sorry for chiming in so late. I very much like the goals of this effort, > > particularly bringing clarity to some of the internal APIs. Some related > > points for your consideration: > > No problem. I have been so busy lately that I haven't gotten a single > commit done... Things look a bit calmer, so I hope I will be able to > start working on Django again. > > > * Would the rows matched vs. updated issue be resolved or clarified in > this > > effort [1]? > > I don't believe this one can be changed. Django currently returns rows > matched, and to remain backwards compatible a flag to .update() would > be needed. The flag would change the return value from matched to > changed rows. This doesn't feel right. > > > * It seems like the work I had started to expose accurate update/delete > > counts [2], and further provide the capability for conditional updates > and > > deletes [3] would be more clearly done on the basis of such a refactor. > > Does that seem accurate to you or will it not make much of a difference > > there? > > For the optimistic concurrency control for model .save(), it seems > that splitting the save_base() to smaller parts could allow subclasses > to do whatever needed for good optimistic concurrency control. Another > option is some sort of hook which allows the instance to add > additional conditions to the save. > > I must note that the idea of the refactor is not to do any drastic > rewrites. The structure of the ORM will stay mostly the same. > Currently my aim is at the add_q/add_filter stage of the ORM, and I > don't see much cross section with what you are doing at this stage. I > don't have any long term plans of where this all is going, it is just > cleanup/bugfixing of existing code. Most likely the save_base() will > need some refactoring too. > > - Anssi > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.