SubQuery without using RawSQL

Sett 156 ganger
Hopp til første uleste melding

schinckel

ulest,
20. apr. 2016, 03:06:0620.04.2016
til 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

ulest,
12. jan. 2017, 07:30:2412.01.2017
til 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

ulest,
12. jan. 2017, 08:12:2012.01.2017
til 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

ulest,
12. jan. 2017, 09:42:0212.01.2017
til 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

ulest,
12. jan. 2017, 15:44:1212.01.2017
til 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.
Svar alle
Svar til forfatter
Videresend
0 nye meldinger