[tracker/binary-log-2: 28/35] libtracker-data: Also replay delete statements
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/binary-log-2: 28/35] libtracker-data: Also replay delete statements
- Date: Tue, 12 Jan 2010 14:50:29 +0000 (UTC)
commit ed772af292236c25c9fc1f8a930cb122fa979a8b
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]