From a27b8713a9d59596ef4e44f0a505c60e4b14340f Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 3 Dec 2023 21:09:23 -0800 Subject: [PATCH] A little bit of extra logging. --- app/src/main/java/net/voussoir/trkpt/Database.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/voussoir/trkpt/Database.kt b/app/src/main/java/net/voussoir/trkpt/Database.kt index 9bddae2..72008af 100644 --- a/app/src/main/java/net/voussoir/trkpt/Database.kt +++ b/app/src/main/java/net/voussoir/trkpt/Database.kt @@ -15,6 +15,7 @@ class Database(val trackbook: Trackbook) fun close() { + Log.i("VOUSSOIR", "Database.close") this.connection.close() this.ready = false this.ready_at = 0 @@ -23,7 +24,7 @@ class Database(val trackbook: Trackbook) fun connect(file: File) { - Log.i("VOUSSOIR", "Connecting to database " + file.absolutePath) + Log.i("VOUSSOIR", "Database.connect: " + file.absolutePath) this.file = file this.connection = openOrCreateDatabase(file, null) this.initialize_tables() @@ -196,6 +197,7 @@ class Database(val trackbook: Trackbook) private fun initialize_tables() { + Log.i("VOUSSOIR", "Database.initialize_tables") begin_transaction() this.connection.execSQL("CREATE TABLE IF NOT EXISTS meta(name TEXT PRIMARY KEY, value TEXT)") this.connection.execSQL("CREATE TABLE IF NOT EXISTS trkpt(device_id INTEGER NOT NULL, time INTEGER NOT NULL, lat REAL NOT NULL, lon REAL NOT NULL, provider TEXT, accuracy REAL, ele INTEGER, sat INTEGER, PRIMARY KEY(device_id, time))")