From f3d72a71871180f6b7ea8f7a09094d9e22aa84fd Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 5 Sep 2006 15:39:59 +0000 Subject: - unicode fix for startswith()/endswith() [ticket:296] --- lib/sqlalchemy/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql.py') diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index d2e270c32..ab371dcb9 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -554,9 +554,9 @@ class CompareMixin(object): # statement out of it. return self._compare('IN', union(parens=True, *other)) def startswith(self, other): - return self._compare('LIKE', str(other) + "%") + return self._compare('LIKE', other + "%") def endswith(self, other): - return self._compare('LIKE', "%" + str(other)) + return self._compare('LIKE', "%" + other) def label(self, name): return Label(name, self, self.type) def distinct(self): -- cgit v1.2.1