Reputation: 1
I'm using SQliteOpenHelper and I have a database manager class:
companion object {
private const val DATABASE_VERSION = 1
private const val DATABASE_NAME = "Name.sqlite"
}
override fun onConfigure(db: SQLiteDatabase) {
super.onConfigure(db)
db.setForeignKeyConstraintsEnabled(true)
}
This handles creating the tables and making queries etc.
Do I make a new DatabaseManager object in my files, or should I pass in one from a different file when I can?
Upvotes: 0
Views: 19