diff options
Diffstat (limited to 'lib/sqlalchemy/dialects')
| -rw-r--r-- | lib/sqlalchemy/dialects/oracle/base.py | 8 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index a3c31b7cc..ba69c3d1f 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -666,15 +666,15 @@ class OracleCompiler(compiler.SQLCompiler): tmp = ' FOR UPDATE' - if select._for_update_arg.nowait: - tmp += " NOWAIT" - if select._for_update_arg.of: tmp += ' OF ' + ', '.join( - self._process(elem) for elem in + self.process(elem) for elem in select._for_update_arg.of ) + if select._for_update_arg.nowait: + tmp += " NOWAIT" + return tmp diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 091fdeda2..69b0fb040 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1020,17 +1020,17 @@ class PGCompiler(compiler.SQLCompiler): else: tmp = " FOR UPDATE" - if select._for_update_arg.nowait: - tmp += " NOWAIT" - if select._for_update_arg.of: # TODO: assuming simplistic c.table here tables = set(c.table for c in select._for_update_arg.of) tmp += " OF " + ", ".join( - self.process(table, asfrom=True) + self.process(table, ashint=True) for table in tables ) + if select._for_update_arg.nowait: + tmp += " NOWAIT" + return tmp def returning_clause(self, stmt, returning_cols): |
