LibreTube/app/src/main/java/com/github/libretube/database/DatabaseHolder.kt

18 lines
401 B
Kotlin
Raw Normal View History

2022-08-13 23:34:07 +05:30
package com.github.libretube.database
import android.content.Context
import androidx.room.Room
import com.github.libretube.DATABASE_NAME
object DatabaseHolder {
lateinit var database: AppDatabase
fun initializeDatabase(context: Context) {
database = Room.databaseBuilder(
context,
AppDatabase::class.java,
DATABASE_NAME
).build()
}
}