- From: Joshua Bell <notifications@github.com>
- Date: Wed, 14 Oct 2015 13:00:08 -0700
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Message-ID: <w3c/IndexedDB/issues/38/148179001@github.com>
Just pondering this... it definitely seems like the naive approach would be to let the collation be an option when creating an index and also add a method to modify it on an existing index, e.g. ```js // I haven't looked at the Moz API here, so don't take this seriously var index = store.createIndex('by_name', 'name', {unique:false, collation: 'de-u-co-phonebk'}); // or for existing indexes: e.transaction.objectStore('products').index('by_model').collation = 'zh-Hans-SG'; ``` ... but agreed with @sicking that bumping the version to do the latter is unfortunate. I guess at a minimum it could be done within a readwrite transaction over the index's store, but that feels very odd if there are existing connections. As a straw man to pick apart, we could pass an `{alter:true}` flag to open() that gives you an `alterneeded` event if the versions match. Same restrictions as upgrade transactions (exclusive, blocked/versionchange events, etc). I don't know if we'd want to artificially restrict the operations allowed in thesenversionchange transactions or not. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/IndexedDB/issues/38#issuecomment-148179001
Received on Wednesday, 14 October 2015 20:01:38 UTC