From: Mike Bayer Date: Thu, 21 Jul 2005 04:48:16 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~861 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=660994d303075b8d55d61598f0c557ef0195e1d2;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 92fd761239..10abbd46aa 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -379,6 +379,15 @@ class ColumnSelectable(Selectable): def __ge__(self, other): return self._compare('>=', other) + def like(self, other): + return self._compare('LIKE', other) + + def startswith(self, other): + return self._compare('LIKE', str(other) + "%") + + def endswith(self, other): + return self._compare('LIKE', "%" + str(other)) + class TableImpl(Selectable): """attached to a schema.Table to provide it with a Selectable interface as well as other functions