SQLite provides an excellent development alternative for applications that are predominantly read-only or require a smaller installation footprint. As with all database servers, though, there are some differences that are specific to SQLite that you should be aware of.
For all SQLite versions, there is some slightly counter-intuitive behavior when attempting to match some types of strings. These are triggered when using the iexact
or contains
filters in Querysets. The behavior splits into two cases:
For substring matching, all matches are done case-insensitively. That is a filter such as filter(
name__contains="aa"
) will match a name of "Aabb".For strings containing characters outside the ASCII range, all exact string matches are performed case-sensitively, even when the case-insensitive options are passed into the query. So the
iexact
filter will behave exactly the same as the exact filter in these cases.
Some possible workarounds for this...