Room persistance library. Delete all

前端 未结 8 1122
再見小時候
再見小時候 2020-12-04 11:59

How can I delete all entries on specific table using Room Persistence Library? I need to drop table, but I cannot to find any information how to do this.

Only when d

8条回答
  •  半阙折子戏
    2020-12-04 12:06

    As of Room 1.1.0 you can use clearAllTables() which:

    Deletes all rows from all the tables that are registered to this database as entities().

提交回复
热议问题