On Wed, Mar 9, 2016 at 11:16 PM, akki <aksheshdo...@gmail.com> 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.
>
>
> Perhaps it would be best not to mix constraints and indexes. I would like to
> know your thoughts on stopping to create indexes explicitly for unique
> constraints because all database do that automatically because that only
> gives a performance degradation as far as I know.

The point is that if the Index class generates the full SQL for the
index creation, then the Index classes can be used to run arbitrary
changes to the database. Having the ability to run arbitrary SQL is
great, but this will lead to users having all sorts of non-indexes in
the indexes meta attribute. I'd like to avoid that if possible.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CALMtK1H%3DHQpYBVB24Pfe7NokhsCU0gnjAykV2GOo%2BO%3D2ig-PTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
        • ... Anssi Kääriäinen
          • ... 'Moritz Sichert' via Django developers (Contributions to Django itself)
            • ... akki
              • ... Anssi Kääriäinen
  • R... Gavin Wahl
  • R... akki
  • R... akki

Reply via email to