Wrapper to support both webSql and indexedDB?

心已入冬 提交于 2019-12-13 08:54:00

问题


My application should support offline mode on the following browsers:

  • IE
  • Chrome
  • Firefox
  • Safari (supports WebSQL only)

and also application using KendoUI for UI. I have looked at JayData which looks good fit for my requirement but I heard JayData wouldn't support some good features like Transactions and so. please share your feedback on Jaydata. also suggest best wrapper to support both webSql and indexedDB?


回答1:


JayData Pro does support transactions, it's free for non-commercial use and payware for commercial use.




回答2:


facebook has an indexeddb polyfill, although there is a bug with indices.

my fork (branch:index_fix) has a fix and a pull request is pending. note: the minified js was not updated, use un-minified version

I have two indexedDB apps and i dropped indexedDB.polyfill.js in there and everything worked perfectly on safari (OSX and iOS)




回答3:


Suitable library depends on use case.

Try my open source library, ydn-db,http://dev.yathit.com/api-reference/ydn-db/storage.html lt supports all of those features.

I will use jaydata for backend sync with odata service. Otherwise, too heavy. Ydn-db itself is heavy. There are many thin wrapper out there. Use facebook indexeddb polyfill for websql.



来源:https://stackoverflow.com/questions/18628980/wrapper-to-support-both-websql-and-indexeddb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!