菜鸟教程小白 发表于 2022-12-11 20:17:29

android - ionic 3 : storage in both IndexedDB and Web SQL


                                            <p><p>我正在开发适用于安卓和 iOS 手机的移动应用程序。</p>

<p>我在使用 Storage 时遇到了一些非常奇怪的事情。我在 IndexedDB 和 Web SQL 中都获取数据(当我在浏览器中测试/调试时)。</p>

<p>这是模块的声明:</p>

<pre><code>IonicStorageModule.forRoot()
</code></pre>

<p>我遇到了麻烦,因为当我尝试从存储中获取数据时,我从 Web SQL(包含旧值...)而不是从我拥有最新值的 IndexedDB 获取数据。</p>

<p>我想设置这样的首选顺序:</p>

<pre><code>IonicStorageModule.forRoot({
    name: &#39;__myprojectdb&#39;,
    driverOrder: [&#39;indexeddb&#39;]
})
</code></pre>

<p>但是,它应该在 iOS 和 Android 上都能正常工作吗?是否有任何要求或首选的数据库类型取决于设备?</p>

<p>我对想法持开放态度!因为我是 Ionic 和移动应用程序的新手。</p>

<p>提前感谢您的帮助:-)</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>所使用的存储空间取决于您使用 Chrome with Ionic 的“检查->预览”模式。 <a href="https://stackoverflow.com/questions/50369826/ionic-storage-unwanted-changing" rel="noreferrer noopener nofollow">You can find more info in this answer</a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于android -ionic3 : storage in both IndexedDB and Web SQL,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/51058209/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/51058209/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: android - ionic 3 : storage in both IndexedDB and Web SQL