数据库DAO
Dao层的部分由于需要使用Db对象,那么Db对象又需要依赖上下文,所以Dao层也需要提供上下文,由于Dao层无法提供上下文,因此Dao层需要在构造的时候传递上下文
Dao层基本上都是SQLiteDatabase对象的操作,本项目使用的是SQLiteDatabase的方法方案来操作数据库,不适用直接的SQL方案
便签的DAO
便签的CRUD
public void insert(Note note)
public ArrayList
selectByAll() public void del(int id)
public void update(Note note)
public Note selectById(int id)