Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-26 Thread akki
> > > That is a bit too strict; sometimes it does make sense to provide more > than > one kind of index on one field. As a trivial example, you may want to > support > case-sensitive uniqueness as well as case-insensitive search (say, for > user- > names). > Ohh yes definitely, I meant no t

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-26 Thread Shai Berger
On Monday 14 March 2016 12:15:33 akki wrote: > > you can't have identical indexes defined in multiple ways with the same > > names. > > Yes, I will be checking for the duplications at the autodetector level > itself. We need to take care that no two indexes are for the same fields, > and none of t

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-25 Thread akki
Hi I have submitted my proposal on GSoC's website. You can find it at https://summerofcode.withgoogle.com/serve/5167032660131840/. It would get locked (from any further editing) at 25 March 19:00 UTC (which is almost 11 hours from now). -- You received this message because you are subscribed

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-23 Thread akki
Hi I had updated my proposal to include the various points that were discussed earlier in this thread. I have now also incorporated the changes that were recently suggested by Tim. Thanks -- You received this message because you are subscribed to the Google Groups "Django developers (Contri

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-23 Thread akki
Hi Tim Thanks for the feedback. Instead of aiming for one huge patch to be merged at the end of the summer, > I'd suggest to think about whether you can break up the work in chunks that > can be merged incrementally. This should decrease the risk that comes with > a huge patch going stale and

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-22 Thread Tim Graham
Instead of aiming for one huge patch to be merged at the end of the summer, I'd suggest to think about whether you can break up the work in chunks that can be merged incrementally. This should decrease the risk that comes with a huge patch going stale and makes code review much easier. It's hel

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread akki
> > > you can't have identical indexes defined in multiple ways with the same > names. > Yes, I will be checking for the duplications at the autodetector level itself. We need to take care that no two indexes are for the same fields, and none of them have a clashing name. On such an occurrenc

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread Marc Tamlyn
I like this a lot. Even we we then keep the "Meta" options as they are forever, they then become shortcuts to what you could define explicitly. In any case, we would need some careful checks that (for example) you can't have identical indexes defined in multiple ways with the same names. On 14 Ma

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread Michal Petrucha
On Mon, Mar 14, 2016 at 12:45:09AM -0700, akki wrote: > Hi Annsi > > Yes, the AddIndex operation would detect the changes and the user would not > have full control over the generated SQL. > > I don't know if it would be a good idea to mix index definitions with > fields while creating models.

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread akki
Hi Annsi Yes, the AddIndex operation would detect the changes and the user would not have full control over the generated SQL. I don't know if it would be a good idea to mix index definitions with fields while creating models. Users have traditionally been defining fields that way and indexes

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread akki
Hi I have updated my proposal and completed the timeline. I saw how expressions work and now have a clear idea of how they would be used in indexes - I have added a short description of the same in my proposal. Please have a look. I would lo

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-14 Thread Anssi Kääriäinen
On Thu, Mar 10, 2016 at 8:17 AM, Markus Holtermann wrote: > Hi Akshesh, > > thank you for your proposal! Sounds like a good plan. > > On Thursday, March 10, 2016 at 8:16:10 AM UTC+11, akki wrote: > >>> Once the index is added to a model, the model can inject itself into the >>> index, or the schem

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-13 Thread Anssi Kääriäinen
I was assuming that the Index class would be responsible for generating the whole SQL. Seems like this isn't the case. I assumed something like this would happen when a new index is added: 1. User adds a new BTreeIndex to a model 2. The makemigrations command detects a change and creates a m

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-13 Thread akki
> What about calling the attribute something like "constraints" similar to > how it's done in SQLAlchemy [1]? For now the attribute can just contain a > list of Index() instances but that would also lay grounds for supporting > check constraints and other related table level options. > Since

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-12 Thread 'Moritz Sichert' via Django developers (Contributions to Django itself)
What about calling the attribute something like "constraints" similar to how it's done in SQLAlchemy [1]? For now the attribute can just contain a list of Index() instances but that would also lay grounds for supporting check constraints and other related table level options. Moritz [1] http:/

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-10 Thread akki
> Would you be able to support partial indexes as well? I am not sure if I would be able to squash it in my GSOC timeline, but yes, I will definitely incorporate it (afterwards, if not during my GSOC). It should not be very hard to implement once I am able to make functional indexes work.

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-10 Thread Anssi Kääriäinen
On Wed, Mar 9, 2016 at 11:16 PM, akki wrote: >> >> Of course, this is a great thing to have. But I wonder if we can do >> something to prevent pushing non-indexes to the indexes attribute of >> Meta. Having Meta.indexes = [CheckTypeConstraint(foo__in=['foo', >> 'bar'])] doesn't read correctly. > >

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread Markus Holtermann
Hi Akshesh, thank you for your proposal! Sounds like a good plan. On Thursday, March 10, 2016 at 8:16:10 AM UTC+11, akki wrote: Once the index is added to a model, the model can inject itself into the >> index, or the schema editor can use the originating model to get data it >> needs. No need

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread Gavin Wahl
Would you be able to support partial indexes as well? On Tuesday, March 8, 2016 at 7:46:02 AM UTC-7, akki wrote: > > Hi > > My name is Akshesh Doshi (akki). I am a student at Indian Institute Of > Technology, Roorkee (IITR). I have been contributing to Django >

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread akki
Hi Josh and Anssi, Thanks for the feedback. Much appreciated. > - The earlier part of your proposal seems to focus on allowing postgres > users to define more complex indexes that they previously haven't been able > to use. Oracle is then highlighted also for allowing functional indexes. I

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-08 Thread Anssi Kääriäinen
If the CREATE INDEX part of the generated SQL isn't hard-coded somewhere outside the Index class, the exact same mechanism can be used to run other DDL commands, like ALTER TABLE ADD CONSTRAINT check_type_choices CHECK (type IN ('foo', 'bar')); Of course, this is a great thing to have. But I wond

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-08 Thread Josh Smeaton
Hi Akshesh, The proposal looks really good so far. I haven't gone through it in depth though, but I'll set aside some time to try and do so. A few comments: - Using the schema editor rather than sqlcompiler is the right choice. - The earlier part of your proposal seems to focus on allowing pos

Proposal on Custom Indexes - Google Summer of Code

2016-03-08 Thread akki
Hi My name is Akshesh Doshi (akki). I am a student at Indian Institute Of Technology, Roorkee (IITR). I have been contributing to Django for quite some time now and my experience has been really great till now. I found the community to be very welc