LitePal   /  ormlite  /   GreenDao 数据库的使用和区别

                     以下仅做参考,自用快速集成

 数据库
                    主要依赖xml  配置

                    LitePal     compile 'org.litepal.android:core:1.6.1'  assets 新增xml文件配置  Application注册 LitePal.initialize(this);   
                    https://www.jianshu.com/p/8035eb5da7a2
                    

                     配置和实现方式类似GreenDao

                    ormlite     创建Helper类  继承基础类即可  基础类必须继承 OrmLiteSqliteOpenHelper
                    

                    类注释直接生成对应的数据库处理模块

                    GreenDao    指定目录即可  集成DaoMaster.OpenHelper   新增DaoTool 工具类
                    greendao {
                        schemaVersion 1
                        daoPackage 'com.sunchip.bluetoothpr.bean.db'
                        targetGenDir 'src/main/java'
                    }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章