summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-02-11 17:51:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-02-11 17:53:29 -0500
commit05f34fc29c9ce6ad1603d1538405f18f08c42df2 (patch)
treed7749b5b43b3d3fd641a45c03c87b2f802147a00 /lib/sqlalchemy/sql/functions.py
parent89dc4562adb38367ee5fabbcc04ee44968af4906 (diff)
downloadsqlalchemy-05f34fc29c9ce6ad1603d1538405f18f08c42df2.tar.gz
test Function(?:Element)._bind_param() with in_()
Fixed 1.4 regression where the :meth:`_functions.Function.in_` method was not covered by tests and failed to function properly in all cases. Fixes: #5934 Change-Id: I93423a296e391aabd5594cb670d36b91ced0231d
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index 78f7ead2e..641715327 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -595,7 +595,7 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative):
"""
return self.select().execute()
- def _bind_param(self, operator, obj, type_=None):
+ def _bind_param(self, operator, obj, type_=None, **kw):
return BindParameter(
None,
obj,
@@ -603,6 +603,7 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative):
_compared_to_type=self.type,
unique=True,
type_=type_,
+ **kw
)
def self_group(self, against=None):
@@ -887,7 +888,7 @@ class Function(FunctionElement):
)
return kw["bind"]
- def _bind_param(self, operator, obj, type_=None):
+ def _bind_param(self, operator, obj, type_=None, **kw):
return BindParameter(
self.name,
obj,
@@ -895,6 +896,7 @@ class Function(FunctionElement):
_compared_to_type=self.type,
type_=type_,
unique=True,
+ **kw
)