From 0883d8213bcfbeb5e0ae6dd1cbcf70494eb06dac Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 23 Mar 2017 15:11:03 -0400 Subject: Treat collation names as identifiers The expression used for COLLATE as rendered by the column-level :func:`.expression.collate` and :meth:`.ColumnOperators.collate` is now quoted as an identifier when the name is case sensitive, e.g. has uppercase characters. Note that this does not impact type-level collation, which is already quoted. Change-Id: I83d5d9cd1e66a4f20b96303bb84c5f360d5d6a1a Fixes: #3785 --- lib/sqlalchemy/sql/operators.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql/operators.py') diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index 8f697b27e..49642acdd 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -695,7 +695,13 @@ class ColumnOperators(Operators): def collate(self, collation): """Produce a :func:`~.expression.collate` clause against - the parent object, given the collation string.""" + the parent object, given the collation string. + + .. seealso:: + + :func:`~.expression.collate` + + """ return self.operate(collate, collation) def __radd__(self, other): -- cgit v1.2.1