rednaks / django-async-orm

Bringing Async Capabilities to django ORM
https://pypi.org/project/django-async-orm/
MIT License
131 stars 9 forks source link

add none query feature and test for the same #17

Closed rkisdp closed 2 years ago

rkisdp commented 2 years ago

Added none query feature:

in Django ORM, calling none() will create a queryset that never returns any objects and no query will be executed when accessing the results. A qs.none() queryset is an instance of EmptyQuerySet.

example:

Entry.objects.none() <QuerySet []> from django.db.models.query import EmptyQuerySet isinstance(Entry.objects.none(), EmptyQuerySet) True

rednaks commented 2 years ago

Thank you for the PR, but shouldn't we return the QuerySetAsync in this case ?

rkisdp commented 2 years ago

In the above example, I am explaining how none works in Django ORM. The pull request feature I raised will return QuerySetAsync. Am I getting you wrong? please tell me if I am not clear to you.

rkisdp commented 2 years ago

@rednaks Hi, can you please review it? I want to contribute more.

rednaks commented 2 years ago

alright, run some tests locally and it seems good. thanks for the contribution !