hafiz
09/26/2024, 8:35 AM@Database(entities = [Employees::class, AssetTable::class], version = 1)
@ConstructedBy(AppDatabaseConstructor::class)
abstract class AppDatabase: RoomDatabase(){
}
// The Room compiler generates the `actual` implementations.
@Suppress("NO_ACTUAL_FOR_EXPECT")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase>
because when compile ./gradlew build always get error thisdanysantiago
09/26/2024, 1:14 PMoverride fun initialize(): AppDatabase
?hafiz
09/30/2024, 2:40 AM@Suppress("NO_ACTUAL_FOR_EXPECT")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase>
danysantiago
09/30/2024, 1:18 PMhafiz
12/02/2024, 3:25 AMdanysantiago
12/02/2024, 2:28 PMexpect object
so Room can initialize the DB in iOS. You don't use the class directly, Room will use it for you when you call build()
on the database builder.hafiz
12/03/2024, 2:57 AM