diff options
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 2cc1d9c42..fd2c9c0bd 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' |
