MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / group_by_clause

Method group_by_clause

lib/sqlalchemy/sql/compiler.py:5445–5454  ·  view source on GitHub ↗

allow dialects to customize how GROUP BY is rendered.

(self, select, **kw)

Source from the content-addressed store, hash-verified

5443 return "DISTINCT " if select._distinct else ""
5444
5445 def group_by_clause(self, select, **kw):
5446 """allow dialects to customize how GROUP BY is rendered."""
5447
5448 group_by = self._generate_delimited_list(
5449 select._group_by_clauses, OPERATORS[operators.comma_op], **kw
5450 )
5451 if group_by:
5452 return " GROUP BY " + group_by
5453 else:
5454 return ""
5455
5456 def order_by_clause(self, select, **kw):
5457 """allow dialects to customize how ORDER BY is rendered."""

Callers 2

visit_compound_selectMethod · 0.95
_compose_select_bodyMethod · 0.95

Calls 1

Tested by

no test coverage detected