Changeset 5580 for django/branches/unicode/django/db/models/query.py
- Timestamp:
- 07/01/07 00:55:01 (1 year ago)
- Files:
-
- django/branches/unicode (modified) (1 prop)
- django/branches/unicode/django/db/models/query.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode
- Property svnmerge-integrated changed from /django/trunk:1-5530 to /django/trunk:1-5579
django/branches/unicode/django/db/models/query.py
r5531 r5580 1 from django.conf import settings 1 2 from django.db import backend, connection, transaction 2 3 from django.db.models.fields import DateField, FieldDoesNotExist … … 24 25 'startswith', 'istartswith', 'endswith', 'iendswith', 25 26 'range', 'year', 'month', 'day', 'isnull', 'search', 27 'regex', 'iregex', 26 28 ) 27 29 … … 799 801 elif lookup_type == 'search': 800 802 return backend.get_fulltext_search_sql(table_prefix + field_name) 803 elif lookup_type in ('regex', 'iregex'): 804 if settings.DATABASE_ENGINE == 'oracle': 805 if lookup_type == 'regex': 806 match_option = 'c' 807 else: 808 match_option = 'i' 809 return "REGEXP_LIKE(%s%s, %s, '%s')" % (table_prefix, field_name, cast_sql, match_option) 810 else: 811 raise NotImplementedError 801 812 raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type) 802 813
