summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2018-01-12 15:50:28 -0500
committerGerrit Code Review <gerrit@ci.zzzcomputing.com>2018-01-12 15:50:28 -0500
commite72cf013cd11cc77de5518c1fe66c9b8b42c3548 (patch)
tree7d45a959a8b5cbabfb09871a1c41cfb773bbfcfe /lib/sqlalchemy/sql/elements.py
parent699272e4dcb9aa71ebbc0d9487fb6de82d3abc2b (diff)
parent7402987fd218c42ed2a909a5031186d2b702bb88 (diff)
downloadsqlalchemy-e72cf013cd11cc77de5518c1fe66c9b8b42c3548.tar.gz
Merge "Make column-level collation quoting dialect-specific"
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index d5d079348..22636a05b 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -52,7 +52,7 @@ def collate(expression, collation):
expr = _literal_as_binds(expression)
return BinaryExpression(
expr,
- ColumnClause(collation),
+ CollationClause(collation),
operators.collate, type_=expr.type)
@@ -3873,6 +3873,13 @@ class ColumnClause(Immutable, ColumnElement):
return c
+class CollationClause(ColumnElement):
+ __visit_name__ = "collation"
+
+ def __init__(self, collation):
+ self.collation = collation
+
+
class _IdentifiedClause(Executable, ClauseElement):
__visit_name__ = 'identified'