-
-
Save shorthouse/62ad3237a64ed3f159eb4d68fb327d46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Database(entities = [Movie::class], version = 1) | |
@ConstructedBy(MovieDatabaseConstructor::class) | |
abstract class MovieDatabase: RoomDatabase() { | |
abstract fun getMovieDao(): MovieDao | |
} | |
// Room compiler generates the `actual` implementations | |
@Suppress("NO_ACTUAL_FOR_EXPECT") | |
expect object MovieDatabaseConstructor : RoomDatabaseConstructor<MovieDatabase> { | |
override fun initialize(): MovieDatabase | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment