Question

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?

Was it helpful?

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

OTHER TIPS

From their documentation, Jaydata don't think Indexeddb is worthy of efficient database. Apparently they ignore the most two important feature of indexeddb: indexing and transaction. However use properly Indexeddb is faster then websql.

Try my library https://bitbucket.org/ytkyaw/ydn-db/overview which love indexeddb so much and so many tricks to use it property.

I'm the one developing the linq2indexeddb lib. If you have some issues around my lib, you can always tell me. I will take a look at it. Also if you want to support more browsers (the ones using WebSQL) you can add the indexeddb shim to your project. This is a shim for using the indexeddb API on top of the WebSQL API. I work closelly together with the developer of the shim so my lib also supports this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top