RhoMobile初始数据库 [英] RhoMobile initial database

查看:98
本文介绍了RhoMobile初始数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用RhoMobile框架时,是否有一种在数据库中设置初始数据的方法?
正如我所见,它使用sqlite数据库。有没有办法添加一个预设的sqlite文件到项目,并使其构建在应用程序捆绑?

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?

推荐答案

数据库具有包含初始数据的平面文件,通过使用 Rho :: RhoUtils.load_offline_data 方法。完整文档此处

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.

这篇关于RhoMobile初始数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆