mirror of https://github.com/M66B/FairEmail.git
Cleanup
This commit is contained in:
parent
d17dd68f3b
commit
edd1d14497
|
@ -97,10 +97,6 @@ public abstract class DB extends RoomDatabase {
|
|||
if (sInstance == null) {
|
||||
Context context = ctx.getApplicationContext();
|
||||
sInstance = migrate(context, getBuilder(context));
|
||||
|
||||
Log.i("SQLite version=" + exec(sInstance, "SELECT sqlite_version() AS sqlite_version"));
|
||||
Log.i("SQLite sync=" + exec(sInstance, "PRAGMA synchronous"));
|
||||
Log.i("SQLite journal=" + exec(sInstance, "PRAGMA journal_mode"));
|
||||
}
|
||||
|
||||
return sInstance;
|
||||
|
@ -114,15 +110,6 @@ public abstract class DB extends RoomDatabase {
|
|||
.setJournalMode(JournalMode.WRITE_AHEAD_LOGGING);
|
||||
}
|
||||
|
||||
private static String exec(DB db, String command) {
|
||||
try (Cursor cursor = db.query(command, new Object[0])) {
|
||||
if (cursor != null && cursor.moveToNext())
|
||||
return cursor.getString(0);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static DB migrate(final Context context, RoomDatabase.Builder<DB> builder) {
|
||||
// https://www.sqlite.org/lang_altertable.html
|
||||
return builder
|
||||
|
|
Loading…
Reference in New Issue