Browse Source

Log sqlite version

main
M66B 6 years ago
parent
commit
eb3582e05d
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      app/src/main/java/eu/faircode/email/DB.java

+ 12
- 0
app/src/main/java/eu/faircode/email/DB.java View File

@ -1,6 +1,7 @@
package eu.faircode.email;
import android.content.Context;
import android.database.Cursor;
import android.text.TextUtils;
import android.util.Log;
@ -94,6 +95,17 @@ public abstract class DB extends RoomDatabase {
@Override
public void onOpen(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "Database version=" + db.getVersion());
Cursor cursor = null;
try {
cursor = db.query("SELECT sqlite_version() AS sqlite_version");
if (cursor.moveToNext())
Log.i(Helper.TAG, "sqlite version=" + cursor.getString(0));
} finally {
if (cursor != null)
cursor.close();
}
super.onOpen(db);
}
})


Loading…
Cancel
Save