Ticket #8553: mysql_soundslike.diff
File mysql_soundslike.diff, 1.7 KB (added by , 16 years ago) |
---|
-
django/db/models/sql/constants.py
4 4 QUERY_TERMS = dict([(x, None) for x in ( 5 5 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in', 6 6 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year', 7 'month', 'day', 'isnull', 'search', 'regex', 'iregex', 7 'month', 'day', 'isnull', 'search', 'regex', 'iregex', 'soundslike', 8 8 )]) 9 9 10 10 # Size of each "chunk" for get_iterator calls. -
django/db/models/fields/__init__.py
219 219 return ["%%%s%%" % connection.ops.prep_for_like_query(value)] 220 220 elif lookup_type == 'iexact': 221 221 return [connection.ops.prep_for_like_query(value)] 222 elif lookup_type == 'soundslike': 223 return [connection.ops.prep_for_like_query(value)] 222 224 elif lookup_type in ('startswith', 'istartswith'): 223 225 return ["%s%%" % connection.ops.prep_for_like_query(value)] 224 226 elif lookup_type in ('endswith', 'iendswith'): -
django/db/backends/mysql/base.py
163 163 'endswith': 'LIKE BINARY %s', 164 164 'istartswith': 'LIKE %s', 165 165 'iendswith': 'LIKE %s', 166 'soundslike': 'SOUNDS LIKE %s', 166 167 } 167 168 168 169 def __init__(self, **kwargs):