[tracker/binary-log-2: 39/50] libtracker-data: Also replay delete statements



commit b2b50280a456254ccb448656eed53915401d0819
Author: Jürg Billeter <j bitron ch>
Date:   Thu Jan 7 14:43:03 2010 +0100

    libtracker-data: Also replay delete statements

 src/libtracker-data/tracker-data-manager.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 9dc2b75..ebdb1e6 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -452,6 +452,21 @@ replay_journal (void)
 			object = query_resource_by_id (object_id);
 
 			tracker_data_insert_statement_with_uri (NULL, subject, predicate, object, &error);
+		} else if (type == TRACKER_DB_JOURNAL_DELETE_STATEMENT) {
+			tracker_db_journal_reader_get_statement (&subject_id, &predicate_id, &object);
+
+			subject = query_resource_by_id (subject_id);
+			predicate = query_resource_by_id (predicate_id);
+
+			tracker_data_delete_statement (NULL, subject, predicate, object, &error);
+		} else if (type == TRACKER_DB_JOURNAL_DELETE_STATEMENT_ID) {
+			tracker_db_journal_reader_get_statement_id (&subject_id, &predicate_id, &object_id);
+
+			subject = query_resource_by_id (subject_id);
+			predicate = query_resource_by_id (predicate_id);
+			object = query_resource_by_id (object_id);
+
+			tracker_data_delete_statement (NULL, subject, predicate, object, &error);
 		}
 	}
 



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