Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Room persistance library. Delete all

  • 0

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 database is migrating or to load all entries and delete them 🙂

Click to rate this post!
[Total: 0 Average: 0]
Share This Post
Share
  1. You can create a DAO method to do this.

    @Dao 
    interface MyDao {
        @Query("DELETE FROM myTableName")
        public void nukeTable();
    }
    • 0
Leave an answer

Leave an answer

Browse

close