diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-31 22:28:17 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-31 22:28:17 +0000 |
commit | 66528a7264be790cfc1c332624dd5c470e47b341 (patch) | |
tree | d310182aff4c290b4466b1206623097ba55f05d2 /lib/sqlalchemy/sql.py | |
parent | d47cc9129d909a0930cdf4fedb1bcf06b2c876fa (diff) | |
download | sqlalchemy-66528a7264be790cfc1c332624dd5c470e47b341.tar.gz |
added for_update flag to Select/CompoundSelect
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r-- | lib/sqlalchemy/sql.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 86c538f27..b86c965c0 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -1176,6 +1176,7 @@ class CompoundSelect(SelectBaseMixin, FromClause): self.use_labels = kwargs.pop('use_labels', False) self.parens = kwargs.pop('parens', False) self.correlate = kwargs.pop('correlate', False) + self.for_update = kwargs.pop('for_update', False) self.oid_column = selects[0].oid_column for s in self.selects: s.group_by(None) @@ -1211,7 +1212,7 @@ class CompoundSelect(SelectBaseMixin, FromClause): class Select(SelectBaseMixin, FromClause): """represents a SELECT statement, with appendable clauses, as well as the ability to execute itself and return a result set.""" - def __init__(self, columns=None, whereclause = None, from_obj = [], order_by = None, group_by=None, having=None, use_labels = False, distinct=False, engine = None, limit=None, offset=None, scalar=False, correlate=True): + def __init__(self, columns=None, whereclause = None, from_obj = [], order_by = None, group_by=None, having=None, use_labels = False, distinct=False, for_update=False, engine=None, limit=None, offset=None, scalar=False, correlate=True): self._froms = util.OrderedDict() self.use_labels = use_labels self.name = None @@ -1221,6 +1222,7 @@ class Select(SelectBaseMixin, FromClause): self.oid_column = None self.limit = limit self.offset = offset + self.for_update = for_update # indicates that this select statement should not expand its columns # into the column clause of an enclosing select, and should instead |