summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-10-04 12:18:20 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-10-04 12:18:20 -0400
commit49e750a1d788710b89764c4dd9c0ddbf9b1f38ad (patch)
tree29db5a6d36c788851e2d523a10e5baa4dd4c1c96 /lib/sqlalchemy/sql/elements.py
parentbe2541736d886eefa6bdbae5581536abba198736 (diff)
downloadsqlalchemy-49e750a1d788710b89764c4dd9c0ddbf9b1f38ad.tar.gz
- changelog, migration for pr github:134
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 53838358d..db14031d2 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -2895,6 +2895,17 @@ class FunctionFilter(ColumnElement):
which controls which rows are passed to it.
It's supported only by certain database backends.
+ Invocation of :class:`.FunctionFilter` is via
+ :meth:`.FunctionElement.filter`::
+
+ func.count(1).filter(True)
+
+ .. versionadded:: 1.0.0
+
+ .. seealso::
+
+ :meth:`.FunctionElement.filter`
+
"""
__visit_name__ = 'funcfilter'
@@ -2916,11 +2927,29 @@ class FunctionFilter(ColumnElement):
This function is also available from the :data:`~.expression.func`
construct itself via the :meth:`.FunctionElement.filter` method.
+ .. versionadded:: 1.0.0
+
+ .. seealso::
+
+ :meth:`.FunctionElement.filter`
+
+
"""
self.func = func
self.filter(*criterion)
def filter(self, *criterion):
+ """Produce an additional FILTER against the function.
+
+ This method adds additional criteria to the initial criteria
+ set up by :meth:`.FunctionElement.filter`.
+
+ Multiple criteria are joined together at SQL render time
+ via ``AND``.
+
+
+ """
+
for criterion in list(criterion):
criterion = _expression_literal_as_text(criterion)