[yunqa.de] Custom Collations

  • From: "Clyde England" <clyde@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 17 Sep 2008 12:45:11 +0800


I am trying to add some custom collations into my application.

I have been looking at the demo examples, and finally got them to work in my 
application (I had to pass SQLITE_UTF16 when doing the creation instead of the 
examples which use SQLITE_UTF8)

However, there is one example that has me puzzled and I would like 

DiSQLite3Collations.pas in the demo folder has SQLite3_Compare_System_Ansi and 
a corresponding SQLite3_Compare_System_NoCase_Ansi

I have implemented both these in my application

However, when I order using these collations the sort sequence is exactly the 
same - case INsenstive.

Case appears to be respected in System_Ansi when used in a "Where" clause, but 
when used in the "Order" clause case appears to be ignored.

I notice you also appear to support both these collations in your SQLiteSpy 

By trial and error I believe these collations in SQLiteSpy are named SYSTEM and 
SYSTEMNOCASE respectively

Tesing in SQLiteSpy also shows the same behaviour when using ORDER

Can you please explain to me why both these collations ORDER in exactly the 
same way, yet WHERE respects case in the former?


Delphi Inspiration mailing list

Other related posts: