Skip to content

Commit 15a39f7

Browse files
Fixed #5985: Changed the lookups in the Oracle backend to use LIKEC instead of LIKE.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent aad5e79 commit 15a39f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

django/db/backends/oracle/base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,16 @@ class DatabaseWrapper(BaseDatabaseWrapper):
396396
operators = {
397397
'exact': '= %s',
398398
'iexact': '= UPPER(%s)',
399-
'contains': "LIKE %s ESCAPE '\\'",
400-
'icontains': "LIKE UPPER(%s) ESCAPE '\\'",
399+
'contains': "LIKEC %s ESCAPE '\\'",
400+
'icontains': "LIKEC UPPER(%s) ESCAPE '\\'",
401401
'gt': '> %s',
402402
'gte': '>= %s',
403403
'lt': '< %s',
404404
'lte': '<= %s',
405-
'startswith': "LIKE %s ESCAPE '\\'",
406-
'endswith': "LIKE %s ESCAPE '\\'",
407-
'istartswith': "LIKE UPPER(%s) ESCAPE '\\'",
408-
'iendswith': "LIKE UPPER(%s) ESCAPE '\\'",
405+
'startswith': "LIKEC %s ESCAPE '\\'",
406+
'endswith': "LIKEC %s ESCAPE '\\'",
407+
'istartswith': "LIKEC UPPER(%s) ESCAPE '\\'",
408+
'iendswith': "LIKEC UPPER(%s) ESCAPE '\\'",
409409
}
410410
oracle_version = None
411411

0 commit comments

Comments
 (0)