How to clean/delete greenDao database

前端 未结 6 1951
误落风尘
误落风尘 2021-01-11 11:41

Currently I\'m doing it like this:

DaoMaster.dropAllTables(getDb(), true);
DaoMaster.createAllTables(getDb(), true);

but then, when I\'m tr

6条回答
  •  迷失自我
    2021-01-11 12:32

    For now it can be done like that:

    for (AbstractDao abstractDao : mDaoSession.getAllDaos()){
        abstractDao.deleteAll();
    }
    

提交回复
热议问题