目录
一、GreenDao简介
二、GreenDao使用步骤(重点)
三、GreenDao使用总结
正文
一、GreenDAO简介
GreenDao是一个为了帮助Android开发者操作SqLite数据库的开源项目。SQLite数据库是一个轻量级的关系型数据库。但是,对SQLite数据库操作需要大量的额外工作,例如,写SQL语句和解析查询出来的结果是一个很繁琐的任务。GreenDao将可以为你解决这一切工作:它可以把Java对象转换成数据库表(也就是所谓大家熟悉的ORM,做过Java的同学应该知道Hibernate框架),用GreenDao可以通过java简单对象的API对数据进行更新、删除以及查询获取的java对象,让你花更多时间解决真的的业务问题。
greenDAO is an open source project to help Android developers working with data stored in SQLite. SQLite is an awesome embedded relational database. However, developing for it requires alot of additional work. Writing SQL and parsing query results are quite tedious tasks. greenDAO will do the work for you: it maps Java objects to database tables (often called
ORM
). This way you can store, update, delete, and query for Java objects using a simple object oriented API. Save time and focus on real problems!
DAO Code Generation Project
Core Classes
GreenDao的设计目标
- 最大的性能(最快的Android ORM解决方案)
- 易用的API
- 高度优化
- 最小的内存消耗
- 最小的项目文件,专注于最需要部分
- Maximum performance (probably the fastest ORM for Android)
- Easy to use APIs
- Highly optimized for Android
- Minimal memory consumption
- Small library size, focus on the essentials