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/dialects/mysql/base.py | |
parent | 106e793d0573b5bcd1ddee549bca1a546aa13972 (diff) | |
download | sqlalchemy-bb60a8ad946dd331f546f06a156b7ebb87d1709d.tar.gz |
- work in progress, will squash
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 324ff2d36..971005a84 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1437,17 +1437,10 @@ class MySQLCompiler(compiler.SQLCompiler): self.process(join.onclause, **kwargs))) def for_update_clause(self, select): - # backwards compatibility - if isinstance(select.for_update, bool): - return ' FOR UPDATE' - elif isinstance(select.for_update, str): - if select.for_update == 'read': - return ' LOCK IN SHARE MODE' - - if select.for_update.mode == 'read': - return ' LOCK IN SHARE MODE' + if select._for_update_arg.read: + return " LOCK IN SHARE MODE" else: - return super(MySQLCompiler, self).for_update_clause(select) + return " FOR UPDATE" def limit_clause(self, select): # MySQL supports: |