﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20775	Clarify the operator each database backend uses for text lookups (startswith, istartswith, contains, icontains, endswith and iendswith)	a_nekhaychik@…	Jacob Walls <jacobtylerwalls@…>	"istartswith

On the page: https://docs.djangoproject.com/en/dev/ref/models/querysets/#field-lookups we can read:

''istartswith
Case-insensitive starts-with.
Example:
Entry.objects.filter(headline__istartswith='will')
SQL equivalent:
SELECT ... WHERE headline ILIKE 'Will%';''

But there is no db backend which uses ILIKE. LIKE will be used for MySQL.


Again if you assume MySQL by default in documentation then:

''startswith
Case-sensitive starts-with.
Example:
Entry.objects.filter(headline__startswith='Will')
SQL equivalent:
SELECT ... WHERE headline LIKE 'Will%';
''

is incorrect because LIKE BINARY will be used.

The same for contains, icontains, endswith and iendswith."	Cleanup/optimization	closed	Documentation	1.5	Normal	fixed		a_nekhaychik@… eromijn@… Yogya Chugh 	Ready for checkin	1	0	0	0	0	0
