[Django] #30891: Convert a Dictionary Into Query-Set and Perform All Orm Queries into it without hitting database

3 views
Skip to first unread message

Django

unread,
Oct 17, 2019, 2:35:51 AM10/17/19
to django-...@googlegroups.com
#30891: Convert a Dictionary Into Query-Set and Perform All Orm Queries into it
without hitting database
-----------------------------------------+------------------------
Reporter: Shakil Ahmmed | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Convert a Dictionary into Django Query-Set and Perform All Orm Queries
into it without hitting database
Example:
https://laravel.com/docs/5.8/collections
https://laravel.com/docs/5.8/collections#method-average

--
Ticket URL: <https://code.djangoproject.com/ticket/30891>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 17, 2019, 2:46:35 AM10/17/19
to django-...@googlegroups.com
#30891: Convert a Dictionary Into Query-Set and Perform All Orm Queries into it
without hitting database.
-------------------------------------+-------------------------------------

Reporter: Shakil Ahmmed | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => wontfix
* component: Utilities => Database layer (models, ORM)


Comment:

Thanks for this ticket, however it is not only about converting dictionary
to a `QuerySet`, you will not be able to perform any queries without a
database. Solution without hitting a database would require a completely
new implementation of ORM. IMO it's not something that we want to add and
maintain as part of Django.

As a workaround you can try to keep you dictionary in a `JSONField` (that
of course hits DB).

--
Ticket URL: <https://code.djangoproject.com/ticket/30891#comment:1>

Reply all
Reply to author
Forward
0 new messages