[tracker/journal] libtracker-data: Support graph_id in resource_buffer_switch
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal] libtracker-data: Support graph_id in resource_buffer_switch
- Date: Fri, 12 Mar 2010 10:29:46 +0000 (UTC)
commit fc99da0fe6eabe841e7d8b671fba2782cb6482d2
Author: Jürg Billeter <j bitron ch>
Date: Fri Mar 12 11:29:25 2010 +0100
libtracker-data: Support graph_id in resource_buffer_switch
src/libtracker-data/tracker-data-update.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 51077d9..6313d52 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1427,6 +1427,7 @@ cache_delete_resource_type (TrackerClass *class,
static void
resource_buffer_switch (const gchar *graph,
+ gint graph_id,
const gchar *subject,
gint subject_id)
{
@@ -1471,12 +1472,16 @@ resource_buffer_switch (const gchar *graph,
g_hash_table_insert (update_buffer.resources_by_id, GINT_TO_POINTER (subject_id), resource_buffer);
} else {
g_hash_table_insert (update_buffer.resources, g_strdup (subject), resource_buffer);
+
+ if (graph != NULL) {
+ graph_id = ensure_resource_id (graph, NULL);
+ }
}
g_value_init (&gvalue, G_TYPE_INT);
g_value_set_int (&gvalue, tracker_data_update_get_next_modseq ());
cache_insert_value ("rdfs:Resource", "tracker:modified", &gvalue,
- graph != NULL ? ensure_resource_id (graph, NULL) : 0,
+ graph_id,
FALSE, FALSE, FALSE);
}
}
@@ -1505,7 +1510,7 @@ tracker_data_delete_statement (const gchar *graph,
return;
}
- resource_buffer_switch (graph, subject, subject_id);
+ resource_buffer_switch (graph, 0, subject, subject_id);
if (object && g_strcmp0 (predicate, RDF_PREFIX "type") == 0) {
class = tracker_ontologies_get_class_by_uri (object);
@@ -1610,7 +1615,7 @@ tracker_data_insert_statement_common (const gchar *graph,
return FALSE;
}
- resource_buffer_switch (graph, subject, 0);
+ resource_buffer_switch (graph, 0, subject, 0);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]