Re: Discussing potential QuerySet.subquery interface

2019-08-20 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
Hello Simon, thanks for the links. I would assume a .subquery() that isn't preceded by a .values() would > result in a SELECT * FROM (...)? > Maybe from implementation perspective it would be easier to copy all fields explicitly. -- You received this message because you are subscribed to the G

Re: Discussing potential QuerySet.subquery interface

2019-08-20 Thread charettes
Hello Alexandr, I agree with Anssi and you that adding a method to perform a subquery pushdown would be useful. FWIW #24462 and #28333 are not the only tickets where that was proposed as a solution. Searching for "subquery" and "pushdown" should bring a few other tickets. There are also intern

Discussing potential QuerySet.subquery interface

2019-08-20 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
Hi, I've been thinking what is the best way to address #28333 - it is desirable to be able to filter by Window expression in ORM. But that requires using subqueries in sql. The ticket itself proposes doing so implicitly and keeping the usual filter int