diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-15 17:08:56 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-15 17:08:56 +0000 |
| commit | 454f1d7f583a6530c28b2ca86235695d6952d292 (patch) | |
| tree | 2a7ad604378304403b4e0253030f0ca1cfc688c3 /lib/sqlalchemy/sql/expression.py | |
| parent | 37b7e458c201a2f7788f3db8d85bed2ab2f8e190 (diff) | |
| download | sqlalchemy-454f1d7f583a6530c28b2ca86235695d6952d292.tar.gz | |
- Query.from_self() as well as query.subquery() both disable
the rendering of eager joins inside the subquery produced.
The "disable all eager joins" feature is available publically
via a new query.enable_eagerloads() generative. [ticket:1276]
- Added a rudimental series of set operations to Query that
receive Query objects as arguments, including union(),
union_all(), intersect(), except_(), insertsect_all(),
except_all(). See the API documentation for
Query.union() for examples.
- Fixed bug that prevented Query.join() and eagerloads from
attaching to a query that selected from a union or aliased union.
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 48b1d0687..65cc903dd 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -3123,6 +3123,12 @@ class CompoundSelect(_SelectBaseMixin, FromClause): def self_group(self, against=None): return _FromGrouping(self) + def is_derived_from(self, fromclause): + for s in self.selects: + if s.is_derived_from(fromclause): + return True + return False + def _populate_column_collection(self): for cols in zip(*[s.c for s in self.selects]): proxy = cols[0]._make_proxy(self, name=self.use_labels and cols[0]._label or None) |
