Changeset 7444
- Timestamp:
- 04/23/08 02:30:59 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/django/db/backends/oracle/base.py
r7427 r7444 120 120 def regex_lookup_10(self, lookup_type): 121 121 if lookup_type == 'regex': 122 match_option = 'c' 123 else: 124 match_option = 'i' 125 return 'REGEXP_LIKE(%%s %%s %s)' % match_option 122 match_option = "'c'" 123 else: 124 match_option = "'i'" 125 return 'REGEXP_LIKE(%%s, %%s, %s)' % match_option 126 127 def regex_lookup(self, lookup_type): 128 # If regex_lookup is called before it's been initialized, then create 129 # a cursor to initialize it and recur. 130 from django.db import connection 131 connection.cursor() 132 return connection.ops.regex_lookup(lookup_type) 126 133 127 134 def sql_flush(self, style, tables, sequences): django/branches/queryset-refactor/django/db/models/sql/where.py
r7252 r7444 141 141 return (connection.ops.fulltext_search_sql(field_sql), params) 142 142 elif lookup_type in ('regex', 'iregex'): 143 return connection.ops.regex_lookup % (field_sql, cast_sql), params143 return connection.ops.regex_lookup(lookup_type) % (field_sql, cast_sql), params 144 144 145 145 raise TypeError('Invalid lookup_type: %r' % lookup_type)
