clokep / django-querysetsequence

Chain multiple (disparate) QuerySets in Django
https://django-querysetsequence.readthedocs.io/
ISC License
107 stars 25 forks source link

iterator() might not perform the Django optimizations #13

Closed clokep closed 6 years ago

clokep commented 8 years ago

I think calling QuerySetSequence(...).iterator() doesn't perform the nice Django optimizations. It seems to just end up in the same iteration code as normal.

Pretty much, we always seem to call iter() or directly iterate through the QuerySets. This shouldn't be too difficult to implement, it involves touching QuerySetSequence(...).iterator(); QuerySeqeunce.__iter__() and QuerySequence._ordered_iterator.

clokep commented 6 years ago

We no longer implement a customer iterator() method after #36.