Refs #30158 -- Added alias argument to Expression.get_group_by_cols().

This commit is contained in:
Simon Charette 2019-03-19 01:05:47 -04:00 committed by Tim Graham
parent 2aaabe2004
commit 9dc367dc10
9 changed files with 67 additions and 18 deletions

View file

@ -974,12 +974,17 @@ calling the appropriate methods on the wrapped expression.
A hook allowing the expression to coerce ``value`` into a more
appropriate type.
.. method:: get_group_by_cols()
.. method:: get_group_by_cols(alias=None)
Responsible for returning the list of columns references by
this expression. ``get_group_by_cols()`` should be called on any
nested expressions. ``F()`` objects, in particular, hold a reference
to a column.
to a column. The ``alias`` parameter will be ``None`` unless the
expression has been annotated and is used for grouping.
.. versionchanged:: 3.0
The ``alias`` parameter was added.
.. method:: asc(nulls_first=False, nulls_last=False)