Chain multiple (disparate) QuerySets in Django
ISC License
None
values are now appropriately sorted first or last (depending on database support. Contributed by @vuongdv-spinshell.Published by clokep over 1 year ago
QuerySetSequence
's support with Django REST Framework's DjangoFilterBackend
by accepting a model
parameter. If one is not provided, a dummy model is used to provide a reasonable DoesNotExist
error. Contributed by @j0nm1. (#88)Published by clokep over 2 years ago
contains()
method. (#85)setup.cfg
. (#84)Published by clokep over 2 years ago
values()
and values_list()
methods. (#73, #74)distinct()
method when each QuerySet
instance is from a unique model. Contributed by @jpic. (#77, #80)filter()
with Q()
objects. Contributed by @jpic. (#76)order_by()
and only()
. (#72)Published by clokep over 2 years ago
explain()
now passes through parameters to the underlying QuerySet
instances. (#69)ModelChoiceField
. Contributed by @jpic. (#68)Published by clokep over 2 years ago
is not
to compare to an integer literal. (#61)Published by clokep over 2 years ago
QuerySetSequence
specific method: get_querysets()
. Contributed by @optiz0r. (#53)Published by clokep over 2 years ago
first()
, last()
, latest()
, and earliest()
methods. (#40, #49)&
and |
operators. (#41)defer()
and only()
methods to control which fields are returned. (#44)using()
to switch databases for an entire QuerySetSequence
. (#44)extra()
, update()
, and annotate()
which get applied to each QuerySet
. (#46, #47)explain()
on Django >= 2.1. (#48)NotImplementedError
on unimplemented methods. This fixes a regression introduced in 0.9. (#42)QuerySet
instances. (#43)Published by clokep over 2 years ago
QuerySet
for better forward compatibility. This change means that QuerySetSequence
is no longer a sub-class of QuerySet
and should improve interactions with other packages which modify QuerySet
. (#38)Published by clokep over 2 years ago
QuerySetSequence
. Contributed by @EvgeneOskin. (#29)Published by clokep over 2 years ago
QuerySetSequence
raised a non-sensical error. (#28)Published by clokep over 2 years ago
QuerySetSequence
did not work properly when the slice reduced the QuerySetSequence
to a single QuerySet
. (#23, #24)Published by clokep over 2 years ago
QuerySets
in the QuerySetSequence
by using '#'
. This allows for additional optimizations when using third-party applications, e.g. Django REST Framework. (#10, #14, #15, #16)CursorPagination
from Django REST Framework under queryset_sequence.pagination.SequenceCursorPagination
which is designed to work efficiently with a QuerySetSequence
by first ordering by internal QuerySet
, then by the ordering
attribute. (#17)PartialInheritanceMeta
must be provided INHERITED_ATTRS
and NOT_IMPLEMENTED_ATTRS
. (#12)queryset_sequence
to an actual module in order to hide some implementation details. (#11)Published by clokep over 2 years ago
Published by clokep over 2 years ago
Model
to use when instantiating a QuerySetSequence
. This is required for compatibility with some third-party applications that check the model
field for equality, e.g. when using the DjangoFilterBackend
with Django REST Framework. Contributed by @CountZachula. (#6)prefetch_related
. (#7)Published by clokep over 2 years ago
QuerySetSequence
. (#5)delete()
to remove items.Published by clokep over 2 years ago
Published by clokep over 2 years ago
NotImplementedError
for QuerySet
methods that QuerySetSequence
does not implement.reverse()
to reverse the item orderingnone()
to return an EmptyQuerySet
exists()
to check if a QuerySetSequence
has any results.select_related
to follow foreign-key relationships when generating results.QuerySets
when calling filter()
or exclude()
like a Django QuerySet
. Contributed by @jpic. (#1)iterator()
.Published by clokep over 2 years ago
order_by()
that references a related model (e.g. a ForeignKey
relationship using foo
or foo_id
syntaxes)order_by()
that references a field on a related model (e.g. foo__bar
)Published by clokep over 2 years ago
order_by()
with a single field