summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-04-04 23:06:39 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-04-04 23:06:39 +0000
commit73732b8a80e69a5e7234463a78c61a12c41e28e5 (patch)
tree2d1aaeef5d378d7bc75dbde35efb98f26f98d1e7 /lib/sqlalchemy/sql.py
parentf4c17daacba4862a545ebb1f7b95e053a0e9165e (diff)
downloadsqlalchemy-73732b8a80e69a5e7234463a78c61a12c41e28e5.tar.gz
- some cleanup of reflection unit tests
- removed silly behavior where sqlite would reflect UNIQUE indexes as part of the primary key (?!) - added __contains__ support to ColumnCollection; contains_column() method should be removed
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index f6c2315ae..4959c4e21 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -1130,6 +1130,9 @@ class ColumnCollection(util.OrderedProperties):
l.append(c==local)
return and_(*l)
+ def __contains__(self, col):
+ return self.contains_column(col)
+
def contains_column(self, col):
# have to use a Set here, because it will compare the identity
# of the column, not just using "==" for comparison which will always return a