diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-08-04 12:34:55 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-08-04 12:34:55 -0400 |
commit | af6f4ab938f1ef66491cf239c91ffff393275d95 (patch) | |
tree | e61fcade57851acab0420679881413a6e6456a75 /lib/sqlalchemy | |
parent | ce1492ef3aae692a3dc10fff400e178e7b2edff8 (diff) | |
download | sqlalchemy-af6f4ab938f1ef66491cf239c91ffff393275d95.tar.gz |
Propagate kwargs to all MySQL CAST paths
Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2
Fixes: #3766
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 5abb1f3d6..7ab9fad69 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -811,13 +811,13 @@ class MySQLCompiler(compiler.SQLCompiler): else: return None - def visit_cast(self, cast, **kwargs): + def visit_cast(self, cast, **kw): # No cast until 4, no decimals until 5. if not self.dialect._supports_cast: util.warn( "Current MySQL version does not support " "CAST; the CAST will be skipped.") - return self.process(cast.clause.self_group()) + return self.process(cast.clause.self_group(), **kw) type_ = self.process(cast.typeclause) if type_ is None: @@ -825,9 +825,9 @@ class MySQLCompiler(compiler.SQLCompiler): "Datatype %s does not support CAST on MySQL; " "the CAST will be skipped." % self.dialect.type_compiler.process(cast.typeclause.type)) - return self.process(cast.clause.self_group()) + return self.process(cast.clause.self_group(), **kw) - return 'CAST(%s AS %s)' % (self.process(cast.clause), type_) + return 'CAST(%s AS %s)' % (self.process(cast.clause, **kw), type_) def render_literal_value(self, value, type_): value = super(MySQLCompiler, self).render_literal_value(value, type_) |