Re: A case for CASE expressions and bulk_update

2015-01-02 Thread Michał Modzelewski
The PR is up at https://github.com/django/django/pull/3825 - Michael On Sunday, December 21, 2014 9:58:19 PM UTC+1, Michał Modzelewski wrote: > I think I can. I'll try to catch you on IRC to discuss API. > > - Michael > > > On Wednesday, December 17, 2014 2:48:31 AM UTC+1, Josh Smeaton wrote:

Re: A case for CASE expressions and bulk_update

2014-12-21 Thread Michał Modzelewski
I think I can. I'll try to catch you on IRC to discuss API. - Michael On Wednesday, December 17, 2014 2:48:31 AM UTC+1, Josh Smeaton wrote: > Thanks Tim, exactly what I was after. I linked to the wiki but obviously > didn't read it all :/ > > Michal, do you think you'll be able to pull Case

Re: A case for CASE expressions and bulk_update

2014-12-16 Thread Josh Smeaton
Thanks Tim, exactly what I was after. I linked to the wiki but obviously didn't read it all :/ Michal, do you think you'll be able to pull Case expressions together by the first or early second week of January to allow for review and changes? Cheers On Wednesday, 17 December 2014 12:28:53

Re: A case for CASE expressions and bulk_update

2014-12-16 Thread Tim Graham
Unlike in previous release cycles, we are going to try a complete feature freeze at alpha. The details are outlined here: https://code.djangoproject.com/wiki/Version1.8Roadmap On Tuesday, December 16, 2014 8:01:23 PM UTC-5, Josh Smeaton wrote: > > On Tuesday, 16 December 2014 18:23:29 UTC+11,

Re: A case for CASE expressions and bulk_update

2014-12-16 Thread Josh Smeaton
On Tuesday, 16 December 2014 18:23:29 UTC+11, Michał Modzelewski wrote: > > Sure. I was planning to work on it myself, but wanted to discuss API, > passing in output_fields, and casting results first. > I started with 2 classes because I only needed SimpleCase first to > implement the

Re: A case for CASE expressions and bulk_update

2014-12-15 Thread Michał Modzelewski
Sure. I was planning to work on it myself, but wanted to discuss API, passing in output_fields, and casting results first. I started with 2 classes because I only needed SimpleCase first to implement the bulk_update. Later I added Case and it seemed clearer to me than the SQLAlchemy and PeeWee

Re: A case for CASE expressions and bulk_update

2014-12-15 Thread Josh Smeaton
Hi Michal, I'm about ready to implement Case/When expressions, do you mind if I use your implementation? Also, do you think it's necessary or desirable to have a SimpleCase and a Case? Josh On Wednesday, 19 November 2014 08:34:10 UTC+11, Michał Modzelewski wrote: > > I've put my code up on

Re: A case for CASE expressions and bulk_update

2014-11-17 Thread Anssi Kääriäinen
I'd like to go for bulk_merge(objects, force_update, force_insert, update_fields) method. The basic implementation would call obj.save() in loop. Optimized implementations could then be added later on. Bulk update would then be an optimized implementation for force_update or update_fields cases.

Re: A case for CASE expressions and bulk_update

2014-11-17 Thread Josh Smeaton
Hi Michael, Great to see new expressions being used already! Speaking specifically about the Case structure, I think it looks nice. I was planning on writing a few functions (https://code.djangoproject.com/ticket/23753) which included Case/When of some description. My idea of a Case API was: