[tracker/IorR-null-support: 6/12] libtracker-data: Allow null upfront a new set for multivalue properties
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/IorR-null-support: 6/12] libtracker-data: Allow null upfront a new set for multivalue properties
- Date: Mon, 15 Aug 2011 14:09:33 +0000 (UTC)
commit 2308c4f4e430878fec2778a4faca43f67812a86b
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Aug 10 10:45:45 2011 +0200
libtracker-data: Allow null upfront a new set for multivalue properties
When null deletes a set of a multivalue property, then the buffer must
be flushed. Else the merging in the buffer might make things go wrong.
src/libtracker-data/tracker-data-update.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 20836a8..314222c 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -3072,7 +3072,7 @@ tracker_data_update_statement (const gchar *graph,
property = tracker_ontologies_get_property_by_uri (predicate);
if (property != NULL) {
if (object == NULL) {
-
+ GError *new_error = NULL;
if (property == tracker_ontologies_get_rdf_type ()) {
g_set_error (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED,
"Using 'null' with '%s' is not supported", predicate);
@@ -3080,6 +3080,10 @@ tracker_data_update_statement (const gchar *graph,
}
delete_all_objects (graph, subject, predicate, error);
+ tracker_data_update_buffer_flush (&new_error);
+ if (new_error) {
+ g_propagate_error (error, new_error);
+ }
} else {
if (tracker_property_get_data_type (property) == TRACKER_PROPERTY_TYPE_RESOURCE) {
tracker_data_update_statement_with_uri (graph, subject, predicate, object, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]