[shotwell] db: Add compile option to trace SQL statements
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] db: Add compile option to trace SQL statements
- Date: Sun, 26 Jun 2016 10:14:53 +0000 (UTC)
commit 3ddd7ec0daee52345beb091dd70f30fffef0f512
Author: Jens Georg <mail jensge org>
Date: Sun Jun 26 10:47:36 2016 +0200
db: Add compile option to trace SQL statements
Signed-off-by: Jens Georg <mail jensge org>
src/db/DatabaseTable.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/db/DatabaseTable.vala b/src/db/DatabaseTable.vala
index 42eac69..09c026f 100644
--- a/src/db/DatabaseTable.vala
+++ b/src/db/DatabaseTable.vala
@@ -49,6 +49,13 @@ public abstract class DatabaseTable {
e.message));
}
}
+#if SQLITE_DEBUG
+ db.trace (on_trace);
+#endif
+ }
+
+ public static void on_trace (string message) {
+ debug ("SQLITE: %s", message);
}
public static void init(string filename) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]