Call getOpenHelper()on RoomDatabase. It gives you SupportSQLiteOpenHelperthat has an API reminiscent of SQLiteOpenHelper. In this case, call getWritableDatabase()to get SupportSQLiteDatabase, and use there execSQL()to execute your SQL statements. A RoomDatabase.Callbackis one place to run this kind of SQL, as AdamMc331 illustrates Kotlin in this snippet .
IOW, Room , API , .