RhoMobile initial database

瘦欲@ 提交于 2020-01-06 14:19:56

问题


Is there a way to setup initial data in a database when using RhoMobile framework? It is using sqlite database as I see. Is there a way to add a preset sqlite file to the project and make it built in the application bundle?


回答1:


You can seed the database with a flat file containing the initial data, through the use of the Rho::RhoUtils.load_offline_data method. Full documentation here.



来源:https://stackoverflow.com/questions/7836527/rhomobile-initial-database

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