diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-15 21:54:16 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-15 21:54:16 +0000 |
| commit | ca92a81191a8ac4627e16838c8f6c1a8300291dc (patch) | |
| tree | 509bdb2ceecabf3514d66413c8b35069734cb955 /lib/sqlalchemy/sql.py | |
| parent | f7a8589994c434c07002809a896c1e4a166f0642 (diff) | |
| download | sqlalchemy-ca92a81191a8ac4627e16838c8f6c1a8300291dc.tar.gz | |
- added optional constructor to sql.ColumnCollection
- mapper sets its "primary_key" attribute to be the ultimately decided primary_key column collection post-compilation
- added compare() method to MapperProperty, defines a comparison operation of the columns represented by the property to some value
- all the above combines into today's controversial feature: saying query.select_by(somerelationname=someinstance) will create the join of the primary key columns represented by "somerelationname"'s mapper to the actual primary key in "someinstance".
- docs for the above
Diffstat (limited to 'lib/sqlalchemy/sql.py')
| -rw-r--r-- | lib/sqlalchemy/sql.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index f6e23d583..323173cc5 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -676,6 +676,9 @@ class ColumnCollection(util.OrderedProperties): overrides the __eq__() method to produce SQL clauses between sets of correlated columns.""" + def __init__(self, *cols): + super(ColumnCollection, self).__init__() + [self.add(c) for c in cols] def add(self, column): """add a column to this collection. |
