[tracker/binary-log] libtracker-data: Append inserted statements to journal



commit b3899cd731e6e18277c6a2589ab5b62259802048
Author: Jürg Billeter <j bitron ch>
Date:   Tue Dec 29 14:28:05 2009 +0100

    libtracker-data: Append inserted statements to journal

 src/libtracker-data/tracker-data-update.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 11f798c..75d898f 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -33,6 +33,7 @@
 
 #include <libtracker-db/tracker-db-manager.h>
 #include <libtracker-db/tracker-db-dbus.h>
+#include <libtracker-db/tracker-db-journal.h>
 
 #include "tracker-data-manager.h"
 #include "tracker-data-update.h"
@@ -1482,6 +1483,10 @@ tracker_data_insert_statement_with_uri (const gchar            *graph,
 		return;
 	}
 
+	tracker_db_journal_append_insert_statement_code (resource_buffer->id,
+		tracker_data_query_resource_id (predicate),
+		tracker_data_query_resource_id (object));
+
 	if (strcmp (predicate, RDF_PREFIX "type") == 0) {
 		/* handle rdf:type statements specially to
 		   cope with inference and insert blank rows */
@@ -1553,6 +1558,10 @@ tracker_data_insert_statement_with_string (const gchar            *graph,
 		return;
 	}
 
+	tracker_db_journal_append_insert_statement (resource_buffer->id,
+		tracker_data_query_resource_id (predicate),
+		object);
+
 	/* add value to metadata database */
 	cache_set_metadata_decomposed (property, object, &actual_error);
 	if (actual_error) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]