From: Jonas Sicking [mailto:[email protected]] 
Sent: Tuesday, March 08, 2011 1:11 PM

>> All in all, is there anything preventing adding the API Pablo suggests
>> in this thread to the IndexedDB spec drafts?

I wanted to propose a couple of specific tweaks to the initial proposal and 
then unless I hear pushback start editing this into the spec.

From reading the details on this thread I'm starting to realize that 
per-database collations won't do it. What did it for me was the example that 
has a fuzzier matching mode (case/accent insensitive). This is exactly the kind 
of index I would want to sort people's names in my address book, but most 
likely not the index I'll want to use for my primary key. 

Refactoring the API to accommodate for this would mean to move the 
setCollation() method and the collation property to the object store and index 
objects. If we were willing to live without the ability to change them we could 
take collation as one of the optional parameters to 
createObjectStore()/createIndex() and reduce a bit of surface area...I don't 
have a strong preference there. In any case both would use BCP47 names as 
discussed in this thread (as Jonas pointed out, implementations can also do 
their thing as long as they don't interfere with BCP47).

Another piece of feedback I heard consistently as I discussed this with various 
folks at Microsoft is the need to be able to pick up what the UA would consider 
the collation that's most appropriate for the user environment (derived from 
settings, page language or whatever). We could support this by introducing a 
special value that  you can pass to setCollation that indicates "pick whatever 
is the right for the environment's language right now". Given that there is no 
other way for people to discover the user preference on this, I think this is 
pretty important.

Thanks
-pablo

Reply via email to