Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Documented that case-insensitive matching is not supported fo…

…r non-ASCII

strings in SQLite. Refs #9905.

Backport of r9705 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ff3320cb6dffba80058c0b88318c2f314f024497 1 parent e8ddef5
Malcolm Tredinnick authored January 06, 2009
20  docs/ref/databases.txt
@@ -265,6 +265,26 @@ of whether ``unique=True`` is specified or not.
265 265
 SQLite notes 
266 266
 ============ 
267 267
  
  268
+SQLite_ provides an excellent development alternative for applications that
  269
+are predominantly read-only or require a smaller installation footprint. As
  270
+with all database servers, though, there are some differences that are
  271
+specific to SQLite that you should be aware of.
  272
+
  273
+.. _SQLite: http://www.sqlite.org/
  274
+
  275
+.. _sqlite-string-matching:
  276
+
  277
+String matching for non-ASCII strings
  278
+--------------------------------------
  279
+
  280
+SQLite doesn't support case-insensitive matching for non-ASCII strings. Some
  281
+possible workarounds for this are `documented at sqlite.org`_, but they are
  282
+not utilised by the default SQLite backend in Django. Therefore, if you are
  283
+using the ``iexact`` lookup type in your queryset filters, be aware that it
  284
+will not work as expected for non-ASCII strings.
  285
+
  286
+.. _documented at sqlite.org: http://www.sqlite.org/faq.html#q18
  287
+
268 288
 Versions prior to 3.3.6
269 289
 ------------------------
270 290
 
29  docs/ref/models/querysets.txt
@@ -986,8 +986,15 @@ SQL equivalent::
986 986
 
987 987
     SELECT ... WHERE name ILIKE 'beatles blog';
988 988
 
989  
-Note this will match ``'Beatles Blog'``, ``'beatles blog'``,
990  
-``'BeAtLes BLoG'``, etc.
  989
+Note this will match ``'Beatles Blog'``, ``'beatles blog'``, ``'BeAtLes
  990
+BLoG'``, etc.
  991
+
  992
+.. admonition:: SQLite users
  993
+
  994
+    When using the SQLite backend and Unicode (non-ASCII) strings, bear in
  995
+    mind the :ref:`database note <sqlite-string-matching>` about string
  996
+    comparisons. SQLite does not do case-insensitive matching for Unicode
  997
+    strings.
991 998
 
992 999
 contains
993 1000
 ~~~~~~~~
@@ -1021,6 +1028,12 @@ SQL equivalent::
1021 1028
 
1022 1029
     SELECT ... WHERE headline ILIKE '%Lennon%';
1023 1030
 
  1031
+.. admonition:: SQLite users
  1032
+
  1033
+    When using the SQLite backend and Unicode (non-ASCII) strings, bear in
  1034
+    mind the :ref:`database note <sqlite-string-matching>` about string
  1035
+    comparisons.
  1036
+
1024 1037
 in
1025 1038
 ~~
1026 1039
 
@@ -1109,6 +1122,12 @@ SQL equivalent::
1109 1122
 
1110 1123
     SELECT ... WHERE headline ILIKE 'Will%';
1111 1124
 
  1125
+.. admonition:: SQLite users
  1126
+
  1127
+    When using the SQLite backend and Unicode (non-ASCII) strings, bear in
  1128
+    mind the :ref:`database note <sqlite-string-matching>` about string
  1129
+    comparisons.
  1130
+
1112 1131
 endswith
1113 1132
 ~~~~~~~~
1114 1133
 
@@ -1138,6 +1157,12 @@ SQL equivalent::
1138 1157
 
1139 1158
     SELECT ... WHERE headline ILIKE '%will'
1140 1159
 
  1160
+.. admonition:: SQLite users
  1161
+
  1162
+    When using the SQLite backend and Unicode (non-ASCII) strings, bear in
  1163
+    mind the :ref:`database note <sqlite-string-matching>` about string
  1164
+    comparisons.
  1165
+
1141 1166
 range
1142 1167
 ~~~~~
1143 1168
 

0 notes on commit ff3320c

Please sign in to comment.
Something went wrong with that request. Please try again.