Loading docs/ref/databases.txt +20 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,26 @@ of whether ``unique=True`` is specified or not. SQLite notes ============ 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. .. _SQLite: http://www.sqlite.org/ .. _sqlite-string-matching: String matching for non-ASCII strings -------------------------------------- SQLite doesn't support case-insensitive matching for non-ASCII strings. Some possible workarounds for this are `documented at sqlite.org`_, but they are not utilised by the default SQLite backend in Django. Therefore, if you are using the ``iexact`` lookup type in your queryset filters, be aware that it will not work as expected for non-ASCII strings. .. _documented at sqlite.org: http://www.sqlite.org/faq.html#q18 Versions prior to 3.3.6 ------------------------ Loading docs/ref/models/querysets.txt +27 −2 Original line number Diff line number Diff line Loading @@ -986,8 +986,15 @@ SQL equivalent:: SELECT ... WHERE name ILIKE 'beatles blog'; Note this will match ``'Beatles Blog'``, ``'beatles blog'``, ``'BeAtLes BLoG'``, etc. Note this will match ``'Beatles Blog'``, ``'beatles blog'``, ``'BeAtLes BLoG'``, etc. .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. SQLite does not do case-insensitive matching for Unicode strings. contains ~~~~~~~~ Loading Loading @@ -1021,6 +1028,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE '%Lennon%'; .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. in ~~ Loading Loading @@ -1133,6 +1146,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE 'Will%'; .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. endswith ~~~~~~~~ Loading Loading @@ -1162,6 +1181,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE '%will' .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. range ~~~~~ Loading Loading
docs/ref/databases.txt +20 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,26 @@ of whether ``unique=True`` is specified or not. SQLite notes ============ 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. .. _SQLite: http://www.sqlite.org/ .. _sqlite-string-matching: String matching for non-ASCII strings -------------------------------------- SQLite doesn't support case-insensitive matching for non-ASCII strings. Some possible workarounds for this are `documented at sqlite.org`_, but they are not utilised by the default SQLite backend in Django. Therefore, if you are using the ``iexact`` lookup type in your queryset filters, be aware that it will not work as expected for non-ASCII strings. .. _documented at sqlite.org: http://www.sqlite.org/faq.html#q18 Versions prior to 3.3.6 ------------------------ Loading
docs/ref/models/querysets.txt +27 −2 Original line number Diff line number Diff line Loading @@ -986,8 +986,15 @@ SQL equivalent:: SELECT ... WHERE name ILIKE 'beatles blog'; Note this will match ``'Beatles Blog'``, ``'beatles blog'``, ``'BeAtLes BLoG'``, etc. Note this will match ``'Beatles Blog'``, ``'beatles blog'``, ``'BeAtLes BLoG'``, etc. .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. SQLite does not do case-insensitive matching for Unicode strings. contains ~~~~~~~~ Loading Loading @@ -1021,6 +1028,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE '%Lennon%'; .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. in ~~ Loading Loading @@ -1133,6 +1146,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE 'Will%'; .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. endswith ~~~~~~~~ Loading Loading @@ -1162,6 +1181,12 @@ SQL equivalent:: SELECT ... WHERE headline ILIKE '%will' .. admonition:: SQLite users When using the SQLite backend and Unicode (non-ASCII) strings, bear in mind the :ref:`database note <sqlite-string-matching>` about string comparisons. range ~~~~~ Loading