当前位置:网站首页>Grendao usage problems

Grendao usage problems

2022-06-24 13:58:00 shuangrenlong

Integrate

GreenDao The use of, 、 encapsulation 、 Optimize upgrade _Mr_ChenXu The blog of -CSDN Blog

GreenDao Basic introduction & Solve the pit encountered - Simple books

Remember to use api It can be passed on to app modular

problem : Only in Ben moudle In the new bean Produce the corresponding beandao  ,app Not in it , How to solve ?

That is to say, it is encapsulated into sdk, There will be problems. ,app. Not made sdk It can be placed directly in moudle Inside . The corresponding entity is also in this moudle

encapsulation

https://www.csdn.net/tags/OtTacg0sOTI2NTItYmxvZwO0O0OO0O0O.html

Package ——DataBase Database collation (greenDao Example ) - Baidu library

android_sqlite Database from basic to SDK encapsulation _dapan728 The blog of -CSDN Blog

SQLiteUtils: SQLiteUtils  It's a simple one based on Android Of Sqlite Database operation encapsulation , It has the following benefits : Easily create tables and add table fields Flexible data type processing By manipulating objects insert perhaps - Gitee.com

Room

Another mainstream is also Google The official recommended database framework , and greenDao similar , The advantage is that sql sentence , The compiler checks at compile time , It is more convenient to use as a whole

Its official documents are as follows

https://developer.android.google.cn/training/data-storage/room

Room stay SQLite An abstraction layer is provided on , In order to make full use of SQLite At the same time , Be able to access the database smoothly .

We strongly recommend that you use Room( instead of SQLite)( Original words on official website )

Use Room Save data to local database  |  Android developer  |  Android Developers

原网站

版权声明
本文为[shuangrenlong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241136296256.html