summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorIlja Everilä <saarni@gmail.com>2014-09-11 15:29:33 +0300
committerIlja Everilä <saarni@gmail.com>2014-09-11 15:29:33 +0300
commitab1c25266dd49f087b5fff316b6ba6fb610b1d35 (patch)
tree667e0f42fd95c96281617c47684594173fb00aca /lib/sqlalchemy/sql/elements.py
parenta3cd517c95e5f341c711c41474de14db97bb7778 (diff)
downloadsqlalchemy-ab1c25266dd49f087b5fff316b6ba6fb610b1d35.tar.gz
renamed aggregatefilter to funcfilter, since it is that
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 5562e80d7..5ac16ab7a 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -2888,28 +2888,28 @@ class Over(ColumnElement):
))
-class AggregateFilter(ColumnElement):
- """Represent an aggregate FILTER clause.
+class FunctionFilter(ColumnElement):
+ """Represent a function FILTER clause.
- This is a special operator against aggregate functions,
+ This is a special operator against aggregate and window functions,
which controls which rows are passed to it.
It's supported only by certain database backends.
"""
- __visit_name__ = 'aggregatefilter'
+ __visit_name__ = 'funcfilter'
criterion = None
def __init__(self, func, *criterion):
- """Produce an :class:`.AggregateFilter` object against a function.
+ """Produce an :class:`.FunctionFilter` object against a function.
- Used against aggregate functions,
- for database backends that support aggregate "FILTER" clause.
+ Used against aggregate and window functions,
+ for database backends that support the "FILTER" clause.
E.g.::
- from sqlalchemy import aggregatefilter
- aggregatefilter(func.count(1), MyClass.name == 'some name')
+ from sqlalchemy import funcfilter
+ funcfilter(func.count(1), MyClass.name == 'some name')
Would produce "COUNT(1) FILTER (WHERE myclass.name = 'some name')".