MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / group_by_clause

Method group_by_clause

lib/sqlalchemy/sql/compiler.py:5241–5250  ·  view source on GitHub ↗

allow dialects to customize how GROUP BY is rendered.

(self, select, **kw)

Source from the content-addressed store, hash-verified

5239 return "DISTINCT " if select._distinct else ""
5240
5241 def group_by_clause(self, select, **kw):
5242 """allow dialects to customize how GROUP BY is rendered."""
5243
5244 group_by = self._generate_delimited_list(
5245 select._group_by_clauses, OPERATORS[operators.comma_op], **kw
5246 )
5247 if group_by:
5248 return " GROUP BY " + group_by
5249 else:
5250 return ""
5251
5252 def order_by_clause(self, select, **kw):
5253 """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