SubQuery without using RawSQL

Visto 156 veces
Saltar al primer mensaje no leído

schinckel

no leída,
20 abr 2016, 3:06:0620/4/16
a Django developers (Contributions to Django itself)
I started some work late last night on attempting to replace some RawSQL() calls that do a sub query with a new Expression.

It actually worked!

Even in the cold light of day, it doesn't seem _too_ bad, so after working on it a bit today with jarshwah, I decided to stick up a WIP PR.


I'd love to have some further input.

Tim Graham

no leída,
12 ene 2017, 7:30:2412/1/17
a Django developers (Contributions to Django itself)
A question about the casing. Since "subquery" is one word, I wouldn't camel case it like SubQuery. Any other opinions?

Josh says, "I prefer the CamelCased SubQuery visually. Subquery looks strange to me, even if it technically can be one word."

Adam Johnson

no leída,
12 ene 2017, 8:12:2012/1/17
a django-d...@googlegroups.com
I vote for Subquery - I wouldn't make a class called SubTitle 😝 Also SubQuery somewhat implies it's a subclass of Query. I think Josh has been staring at Query for too long 😀

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e987bf04-c42a-4985-8785-2683acbafda8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Adam

Marc Tamlyn

no leída,
12 ene 2017, 9:42:0212/1/17
a django-d...@googlegroups.com
Subquery is one word so the lowercase Q would be correct yes. I'm skewed from using SubQuery in my code for the last few months, so that looks fine to me, but let's not get into another query_set problem

Josh Smeaton

no leída,
12 ene 2017, 15:44:1212/1/17
a Django developers (Contributions to Django itself)
I like my bike sheds to be green. But I don't have a problem painting it red either. It seems red is the more popular colour, and that's fine.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos