diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 23:23:27 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 23:23:27 -0500 |
commit | 31cecebd4831fbf58310509c1486244a532d96b9 (patch) | |
tree | 00028588d33a02b2847dbaadfc20ea0c1f9653d6 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 4aaf3753d75c68050c136e734c29aae5ff9504b4 (diff) | |
download | sqlalchemy-31cecebd4831fbf58310509c1486244a532d96b9.tar.gz |
- add support for specifying tables or entities for "of"
- implement Query with_for_update()
- rework docs and tests
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 69b0fb040..7ad266b58 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1021,8 +1021,9 @@ class PGCompiler(compiler.SQLCompiler): tmp = " FOR UPDATE" if select._for_update_arg.of: - # TODO: assuming simplistic c.table here - tables = set(c.table for c in select._for_update_arg.of) + tables = util.OrderedSet( + c.table if isinstance(c, expression.ColumnClause) + else c for c in select._for_update_arg.of) tmp += " OF " + ", ".join( self.process(table, ashint=True) for table in tables |