[tracker/journal: 5/10] libtracker-data: Support graph_id in resource_buffer_switch
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal: 5/10] libtracker-data: Support graph_id in resource_buffer_switch
- Date: Mon, 15 Mar 2010 14:12:25 +0000 (UTC)
commit 4da82f51a371f3fd96819f7a78ff6f2cd0e996ea
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 c3c2469..f5b2c78 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1430,6 +1430,7 @@ cache_delete_resource_type (TrackerClass *class,
static void
resource_buffer_switch (const gchar *graph,
+ gint graph_id,
const gchar *subject,
gint subject_id)
{
@@ -1474,12 +1475,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);
}
}
@@ -1508,7 +1513,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);
@@ -1613,7 +1618,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]