How to clean/delete greenDao database

前端 未结 6 1954
误落风尘
误落风尘 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:28

    Try this one:

    QueryBuilder qb = SQLConfig.cartDao.queryBuilder();
    List mUpadateData = qb.where(cartDao.Properties.Product_sku.eq(skuApi)).list();
    SQLConfig.cartDao.deleteInTx(mUpadateData);
    

提交回复
热议问题