jquery mobile 和 Phonegap 的大型数据库
我正在使用jquery mobile和phonegap为android和ios构建一个移动应用程序。这只是姓名及其地址的集合,总计超过 7000 行。据我所知,phonegap 不支持数据迁移,因此这意味着如果我必须使用 sqllite,我必须在首次启动时将大量数据注入到手机的 sql 中。我认为这是一个问题,因为它需要一段时间,并且可能会强制关闭应用程序,或者可能会推迟用户。
有没有其他方法可以在不造成大量注射的情况下实现这一点?是否可以将这些数据放入一个文本文件中?但我不确定 jqm 是否有能力使用这种方法进行搜索和更新。我显然迷路了。我已经在谷歌上搜索过这个问题,但没有找到解决方案。请帮忙。非常感谢。
I am building a mobile app using jquery mobile and phonegap for both android and ios. This is just a collection of names and their addresses which amounted to over 7 thousand rows. As I've learned, phonegap doesn't support data migration so this means that if I have to use sqllite, I have to inject the large amount of data into phone's sql on first launch. I think this is a problem as it will take awhile and may force close the app, or may put off users.
Is there any other way accomplish this without causing heavy injections? is it possible to put these data in one text file? but am not sure if jqm has the ability to search and update using this method. I am clearly lost. I have searched google about this but no solution found. Please help. many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个关于如何将数据库复制并预先创建到您的 PhoneGap 应用程序中的很好的教程:
教程链接
Here is a good tutorial on how to copy and pre-created DB into your PhoneGap app:
Tutorial Link
为什么不将少量地址放在本地存储中,然后当用户想要请求更多地址时,从在线服务器(如 php/mysql)获取它们并使用 json 解析它们?
why don't you put a small amount of addresses in local storage and then when the user wants to request more addresses, you fetch them from an online server (like php/mysql) and parse them using json?