[tracker/tracker-0.10: 31/68] libtracker-data: Fixes after review for nrl:InverseFunctionalProperty change detection
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10: 31/68] libtracker-data: Fixes after review for nrl:InverseFunctionalProperty change detection
- Date: Thu, 28 Apr 2011 12:52:36 +0000 (UTC)
commit 1f76d368b65cd4432a4e1c07a0498e1155ae1de8
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Apr 15 15:13:00 2011 +0200
libtracker-data: Fixes after review for nrl:InverseFunctionalProperty change detection
src/libtracker-data/tracker-data-manager.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index a3fc5a7..108d841 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1454,7 +1454,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
TrackerProperty *secondary_index;
gboolean indexed_set = FALSE, in_onto;
GError *n_error = NULL;
- TrackerDBCursor *cursor;
+ TrackerSparqlCursor *cursor;
subject = tracker_property_get_uri (property);
@@ -1462,7 +1462,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
in_onto = tracker_property_get_is_inverse_functional_property (property);
query = g_strdup_printf ("ASK { <%s> a nrl:InverseFunctionalProperty }", subject);
- cursor = tracker_data_query_sparql_cursor (query, &n_error);
+ cursor = TRACKER_SPARQL_CURSOR (tracker_data_query_sparql_cursor (query, &n_error));
g_free (query);
if (n_error) {
@@ -1470,14 +1470,15 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
return;
}
- if (cursor && tracker_db_cursor_iter_next (cursor, NULL, NULL)) {
- if (g_strcmp0 (tracker_db_cursor_get_string (cursor, 0, NULL), in_onto ? "false" : "true") == 0) {
+ if (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
+ if (tracker_sparql_cursor_get_boolean (cursor, 0) != in_onto) {
handle_unsupported_ontology_change (ontology_path,
subject,
- "nrl:InverseFunctionalProperty", "1", "0",
+ "nrl:InverseFunctionalProperty", "-", "-",
&n_error);
if (n_error) {
+ g_object_unref (cursor);
g_propagate_error (error, n_error);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]