mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 07:10:29 +05:30
18 lines
401 B
Kotlin
18 lines
401 B
Kotlin
|
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()
|
||
|
}
|
||
|
}
|