diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-08-19 22:19:59 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-08-19 22:22:24 -0400 |
| commit | 3e2f61c439dab76133a49b7a16b03bf4071d4c4c (patch) | |
| tree | 7d3ba13926308309286bd5ccf9618c4bd22cbd4b /lib/sqlalchemy | |
| parent | c3869f23836bd35d5ed565a4b84b4ab70293c0f7 (diff) | |
| download | sqlalchemy-3e2f61c439dab76133a49b7a16b03bf4071d4c4c.tar.gz | |
Add missing range_ / rows parameters to additional over() methods
Added missing window function parameters
:paramref:`.WithinGroup.over.range_` and :paramref:`.WithinGroup.over.rows`
parameters to the :meth:`.WithinGroup.over` and
:meth:`.FunctionFilter.over` methods, to correspond to the range/rows
feature added to the "over" method of SQL functions as part of
:ticket:`3049` in version 1.1.
Fixes: #4322
Change-Id: I77dcdac65c699a4b52a3fc3ee09a100ffb4fc20e
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 2a6fa323c..5f9fd2ebf 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -3368,7 +3368,7 @@ class WithinGroup(ColumnElement): *util.to_list(order_by), _literal_as_text=_literal_as_label_reference) - def over(self, partition_by=None, order_by=None): + def over(self, partition_by=None, order_by=None, range_=None, rows=None): """Produce an OVER clause against this :class:`.WithinGroup` construct. @@ -3376,7 +3376,9 @@ class WithinGroup(ColumnElement): :meth:`.FunctionElement.over`. """ - return Over(self, partition_by=partition_by, order_by=order_by) + return Over( + self, partition_by=partition_by, order_by=order_by, + range_=range_, rows=rows) @util.memoized_property def type(self): @@ -3477,7 +3479,7 @@ class FunctionFilter(ColumnElement): return self - def over(self, partition_by=None, order_by=None): + def over(self, partition_by=None, order_by=None, range_=None, rows=None): """Produce an OVER clause against this filtered function. Used against aggregate or so-called "window" functions, @@ -3495,7 +3497,9 @@ class FunctionFilter(ColumnElement): See :func:`~.expression.over` for a full description. """ - return Over(self, partition_by=partition_by, order_by=order_by) + return Over( + self, partition_by=partition_by, order_by=order_by, + range_=range_, rows=rows) @util.memoized_property def type(self): |
