j256 / ormlite-android

ORMLite Android functionality used in conjunction with ormlite-core
http://ormlite.com/
ISC License
1.59k stars 366 forks source link

Add constructor with DatabaseErrorHandler fix #111 #120

Closed yuriy-blinov closed 3 years ago

yuriy-blinov commented 3 years ago

fix #111

SQLiteOpenHelper class has a constructor

public SQLiteOpenHelper(Context context, String name, CursorFactory factory, int version, DatabaseErrorHandler errorHandler)

@param errorHandler the {@link DatabaseErrorHandler} to be used when sqlite reports database

using this we can supply our custom DatabaseErrorHandler to get the callback of void onCorruption(SQLiteDatabase dbObj); and handle the DB corruption

OrmLiteSqliteOpenHelper class does not have any constructor which accepts DatabaseErrorHandler