From 2f9bc2c338ce45b5d24cd0a795c4f801435fcbb4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 19 Mar 2006 16:21:33 +0000 Subject: added distinct() function to column elements for "DISTINCT " --- lib/sqlalchemy/sql.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index f78d4fa73..b88cf18cd 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -490,6 +490,8 @@ class CompareMixin(object): return self._compare('LIKE', "%" + str(other)) def label(self, name): return Label(name, self) + def distinct(self): + return CompoundClause(None,"DISTNCT", self) def op(self, operator): return lambda other: self._compare(operator, other) # and here come the math operators: -- cgit v1.2.1