diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 12:37:15 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 12:37:15 -0500 |
commit | bb60a8ad946dd331f546f06a156b7ebb87d1709d (patch) | |
tree | d530604307af524dc87355811fd103718114c258 /lib/sqlalchemy/sql/compiler.py | |
parent | 106e793d0573b5bcd1ddee549bca1a546aa13972 (diff) | |
download | sqlalchemy-bb60a8ad946dd331f546f06a156b7ebb87d1709d.tar.gz |
- work in progress, will squash
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 7725196ff..0fc99897e 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1515,7 +1515,7 @@ class SQLCompiler(Compiled): order_by_select=order_by_select, **kwargs) if select._limit is not None or select._offset is not None: text += self.limit_clause(select) - if select.for_update: + if select._for_update_arg: text += self.for_update_clause(select) if self.ctes and \ @@ -1571,15 +1571,7 @@ class SQLCompiler(Compiled): return "" def for_update_clause(self, select): - # backwards compatibility - if isinstance(select.for_update, bool): - return " FOR UPDATE" if select.for_update else "" - elif isinstance(select.for_update, str): - return " FOR UPDATE" - elif select.for_update.mode is not None: - return " FOR UPDATE" - else: - return "" + return " FOR UPDATE" def returning_clause(self, stmt, returning_cols): raise exc.CompileError( |