From 73732b8a80e69a5e7234463a78c61a12c41e28e5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 4 Apr 2007 23:06:39 +0000 Subject: - 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 --- lib/sqlalchemy/sql.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy/sql.py') 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 -- cgit v1.2.1