Skip to content
  • Jared Hancock's avatar
    5c68eb31
    orm: Allow specification of GROUP BY clause, speed-up client stats · 5c68eb31
    Jared Hancock authored
    This patch changes the automatic GROUP BY clause for annotations in the ORM
    including aggregate queries (like COUNT), by allowing the query to specify
    "distinct" fields. If distinct fields are specified, then no other fields
    are automatically added to the GROUP BY clause of the compiled query.
    
    This will likely only be supported by MySQL, as other engines and the ANSI
    standard require all non-aggregate fields in the SELECT clause to be present
    in the GROUP BY clause.
    5c68eb31
    orm: Allow specification of GROUP BY clause, speed-up client stats
    Jared Hancock authored
    This patch changes the automatic GROUP BY clause for annotations in the ORM
    including aggregate queries (like COUNT), by allowing the query to specify
    "distinct" fields. If distinct fields are specified, then no other fields
    are automatically added to the GROUP BY clause of the compiled query.
    
    This will likely only be supported by MySQL, as other engines and the ANSI
    standard require all non-aggregate fields in the SELECT clause to be present
    in the GROUP BY clause.
Loading