SubQuery without using RawSQL

156 views
Skip to first unread message

schinckel

unread,
Apr 20, 2016, 3:06:06 AM4/20/16
to 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

unread,
Jan 12, 2017, 7:30:24 AM1/12/17
to 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

unread,
Jan 12, 2017, 8:12:20 AM1/12/17
to 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

unread,
Jan 12, 2017, 9:42:02 AM1/12/17
to 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

unread,
Jan 12, 2017, 3:44:12 PM1/12/17
to 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.
Reply all
Reply to author
Forward
0 new messages