Search code examples
javascripthtmlindexingindexeddbjaydata

How to create an index for a table in indexedDB using JayData


We have been trying out JayData as the layer of abstraction to multiple data providers in an HTML5 web app that targets multiple platforms and devices.

We also have been using the Linq2IndexedDB library with some amount of success and using that library we were able to create indices for the tables. But so far we could not figure out how to do this using JayData IndexedDB provider or if this is even supported.

Could someone show how can JayData be used to create an index for an indexedDb table using JayData?


Solution

  • I can confirm that the support for indices is on the way - expect the release in this year. Not only for IndexedDB but for WebSQL/sqLite and mongoDB too. Also with the help of indices will come the support for navigation proprties for key based stores like indexeddb and mongodb in Q1 2013.

    With regard transactions: everything considered one (logical) transaction that happens when a set of changes are saved with saveChanges. If the provider supports rollbacks than en error in saving any of the items will revert any previous changes in the same batch. As an example see this: webSQL transactions with JayData

    @Kyaw Tun Please point me to the documentaion that states indexedDB is not important for JayData, we have to ammend it, thanks. I check your library