mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Log sqlite version
This commit is contained in:
parent
38b939a88d
commit
eb3582e05d
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue