将IndexedDB与Sql Server同步

编程入门 行业动态 更新时间:2024-10-26 13:29:23
本文介绍了将IndexedDB与Sql Server同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用HTML5 IndexedDB概念在页面中进行脱机数据库连接..但是最初,我想获取大数据以将其存储在IndexedDb中,因此,我试图将Sql Server数据同步到IndexedDb数据库,但我没有找到任何解决方案来做..有没有办法做到这一点,如果可以,请帮我..谢谢..

I am doing offline DB connectivity in my page using HTML5 IndexedDB concepts.. But Initially, I want to fetch large datas to store it in my IndexedDb, so for that purpose, I am trying to sync Sql Server Data to my IndexedDb Datatbase but I didnt find any solution to do that.. Is there any way to do that, If so Pls help me.. thank you..

推荐答案

据我对您的问题的理解,如果数据库完成了,您就像缓存层一样使用indexeddb.我会做的是以下事情.

From what I understand in your question, you are just using indexeddb like a cache layer in case the db goes done. What I would do is the following.

如果您正在在线工作,则应通过2次操作保存数据.保存到您的服务(SQL Server)并保存到indexeddb.

In case you are working online a save of your data should exist out af 2 actions. Saving to your service (SQL server) and save to your indexeddb.

如果您离线,我会进行2次操作. On仍在更新indexeddb,但是我将添加一个额外的对象存储,您可以在其中保存必须在服务上执行的所有操作.重新联机后,您可以一个一个地处理它们.

In case when you are offline I would do 2 operation. On is still updating your indexeddb, but I would add an extra object store where you save all of your operation that have to be preformed on your service. Once back online, you can processes them one by one.

更多推荐

将IndexedDB与Sql Server同步

本文发布于:2023-10-30 03:56:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541684.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:IndexedDB   Sql   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!