Opened 5 years ago

Closed 5 years ago

#30891 closed New feature (wontfix)

Convert a Dictionary Into Query-Set and Perform All Orm Queries into it without hitting database.

Reported by: Shakil Ahmmed Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Component: UtilitiesDatabase layer (models, ORM)
Resolution: wontfix
Status: newclosed
Summary: Convert a Dictionary Into Query-Set and Perform All Orm Queries into it without hitting databaseConvert a Dictionary Into Query-Set and Perform All Orm Queries into it without hitting database.

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).

Note: See TracTickets for help on using tickets.
Back to Top