createDatabaseHelper

protected open fun createDatabaseHelper(context: Context, databaseName: String, version: Int): SQLiteOpenHelper

Factory method to create the appropriate database helper. This method follows the factory method pattern to allow subclasses to provide their own DatabaseHelper implementation without modifying the base class.

For example, a subclass might override this to provide a helper with custom migration logic or specialized table creation behavior.

Return

A SQLiteOpenHelper instance that will manage the database

Parameters

context

The Android context used to create the database

databaseName

The name of the database file

version

The database version