diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-09 14:58:26 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-09 14:58:26 -0500 |
commit | 81aa5b376eb80793e3734eb420b82872d2941d6f (patch) | |
tree | 4da2b193cdf4197580cf05e7794f1dc723b58ad0 /lib/sqlalchemy/sql/compiler.py | |
parent | 53da71fcc2e82c1e6f7b174436043c06257af927 (diff) | |
download | sqlalchemy-81aa5b376eb80793e3734eb420b82872d2941d6f.tar.gz |
- Literal values within a :class:`.DefaultClause`, which is invoked
when using the :paramref:`.Column.server_default` parameter, will
now be rendered using the "inline" compiler, so that they are rendered
as-is, rather than as bound parameters.
fixes #3087
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index da62b1434..f8f4d1dda 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2279,7 +2279,8 @@ class DDLCompiler(Compiled): if isinstance(column.server_default.arg, util.string_types): return "'%s'" % column.server_default.arg else: - return self.sql_compiler.process(column.server_default.arg) + return self.sql_compiler.process( + column.server_default.arg, literal_binds=True) else: return None |