#15659: Contains lookups give wrong results on SQLite3 backend
------------------------------------+-----------------------------
Reporter: boxm | Owner: nobody
Type: Bug | Status: reopened
Milestone: 1.3 | Component: Documentation
Version: 1.3 | Severity: Normal
Resolution: | Keywords: sqlite
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
------------------------------------+-----------------------------
Changes (by lukeplant):
* component: Database layer (models, ORM) => Documentation
* stage: Unreviewed => Accepted
Comment:
Having looked at the documentation for GLOB and LIKE, we've got some
problems, which I may as well document here.
Without the case_sensitive_like pragma, we have this:
|| ||ASCII ||Non ASCII ||
||LIKE ||Case-insensitive||Case sensitive ||
||GLOB ||Case-sensitive ||Case sensitive ||
(With the case_sensitive_like=true, just the top left is changed, which is
not an improvement). Unfortunately, this means we've got problems with
Unicode whichever way we go, because we don't have a way of doing case
insensitive matching.
Being able to specify case-sensitive matching for ASCII is still a useful
feature, but looking at GLOB, this doesn't seem possible, because it
cannot be used as a drop in replacement for LIKE with different wildcards,
since it lacks the ESCAPE clause that LIKE has, which we need. See
http://www.sqlite.org/lang_corefunc.html
A documentation improvement would be helpful though, and I'm accepting on
that basis. The icontains lookup, the contains lookup, the iexact lookup
and the SQLite DB notes could all do with consistent or cross referenced
information (some of it is there already).
--
Ticket URL: <http://code.djangoproject.com/ticket/15659#comment:8>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.