[tracker/ontology-cope] squashme
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/ontology-cope] squashme
- Date: Fri, 19 Mar 2010 14:26:29 +0000 (UTC)
commit 5536abeebbb0ccf1155b9802dba23aa76ff9d985
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Mar 19 15:25:57 2010 +0100
squashme
src/libtracker-data/tracker-data-update.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index df36901..ef17da5 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2233,30 +2233,6 @@ tracker_data_sync (void)
tracker_db_journal_fsync ();
}
-static gchar *
-query_resource_by_id (gint id)
-{
- TrackerDBCursor *cursor;
- TrackerDBInterface *iface;
- TrackerDBStatement *stmt;
- gchar *uri;
-
- g_return_val_if_fail (id > 0, NULL);
-
- iface = tracker_db_manager_get_db_interface ();
-
- stmt = tracker_db_interface_create_statement (iface,
- "SELECT Uri FROM Resource WHERE ID = ?");
- tracker_db_statement_bind_int (stmt, 0, id);
- cursor = tracker_db_statement_start_cursor (stmt, NULL);
- g_object_unref (stmt);
-
- tracker_db_cursor_iter_next (cursor);
- uri = g_strdup (tracker_db_cursor_get_string (cursor, 0));
- g_object_unref (cursor);
-
- return uri;
-}
static void
free_queued_statement (QueuedStatement *queued)
{
@@ -2509,8 +2485,8 @@ tracker_data_replay_journal (GHashTable *classes,
tracker_db_journal_reader_get_statement_id (&graph_id, &subject_id, &predicate_id, &object_id);
if (in_ontology) {
- gchar *object_n;
- object_n = query_resource_by_id (object_id);
+ const gchar *object_n;
+ object_n = g_hash_table_lookup (id_uri_map, GINT_TO_POINTER (object_id));
ontology_queue = ontology_statement_insert (ontology_queue,
graph_id,
subject_id,
@@ -2519,7 +2495,6 @@ tracker_data_replay_journal (GHashTable *classes,
classes,
properties,
id_uri_map);
- g_free (object_n);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]