Excellent work on this akaariai!
I think the best way I could help with this ticket, would be to use it in
development in our future branch over the next few months with some of our
complex reporting systems. Absolutely packed with work at the moment, so
this would be in the next 2 - 3 months. Eit
On Wed, Jun 29, 2011 at 3:55 PM, Simon Riggs wrote:
...
> I'm not sure I like your ORM syntax to generate that though. Why not
> just pass through the case statement directly? That way *any* legal
> CASE statement can be used, without inventing new ORM syntax each
> time.
Tables get aliased depen
On Wed, Jun 29, 2011 at 9:27 PM, akaariai wrote:
> On Jun 28, 5:46 pm, Javier Guerra Giraldez wrote:
>> i might be totally wrong (wouldn't be first time..) but i've found
>> myself having to adapt to local dialects almost every time i see some
>> SQL inside a function, especially on mysql and sql
On Jun 28, 5:46 pm, Javier Guerra Giraldez wrote:
> i might be totally wrong (wouldn't be first time..) but i've found
> myself having to adapt to local dialects almost every time i see some
> SQL inside a function, especially on mysql and sqlite. maybe it's
> because of the bad quality of code
On Tue, Jun 28, 2011 at 9:26 AM, akaariai wrote:
>> this looks quite non-portable
>
> How? The CASE statement is specified in SQL standard, and it is
> implemented in all database I have used.
i might be totally wrong (wouldn't be first time..) but i've found
myself having to adapt to local diale
On Jun 28, 5:18 pm, Javier Guerra Giraldez wrote:
> On Tue, Jun 28, 2011 at 8:41 AM, akaariai wrote:
> > This should translate to the following SQL:
> > SELECT sum(case when house.price > 41000 and house.price < 43000 then
> > 1 else 0 end) as expensive_house,
> > sum(case when house.price
On Tue, Jun 28, 2011 at 8:41 AM, akaariai wrote:
> This should translate to the following SQL:
> SELECT sum(case when house.price > 41000 and house.price < 43000 then
> 1 else 0 end) as expensive_house,
> sum(case when house.price > 43000 then 1 else 0 end) as
> really_expensive_house, ...
>
On Jun 27, 4:54 pm, Russell Keith-Magee
wrote:
> > queryset.aggregate(
> > expensive_house=Count(house__price,
> > only=(Q(house__price__gt=41000), Q(house__price__lt=43000))),
> > ...
> > )
>
> Ok, so that's you're syntax proposal. Now show me the SQL that this
> translates into. In part
On Fri, Jun 24, 2011 at 11:54 PM, stan wrote:
> This topic is discussed on the Ticket #11305 :
> https://code.djangoproject.com/ticket/11305
>
> Like many folks, I am hit by the scenario where a relative simple
> query become a design decision because my «boss» asked me : "Hey Stan,
> can you add
This topic is discussed on the Ticket #11305 :
https://code.djangoproject.com/ticket/11305
Like many folks, I am hit by the scenario where a relative simple
query become a design decision because my «boss» asked me : "Hey Stan,
can you add me a column with the number of valid items in each
catego
10 matches
Mail list logo