[tracker/IorR-null-support] libtracker-data: Make null, x, null, y, z work



commit 77094020dfe40ee8bfa874bf9e73360e3619eb02
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Aug 11 15:38:50 2011 +0200

    libtracker-data: Make null,x,null,y,z work

 src/libtracker-data/tracker-data-update.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 314222c..8d5266c 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -3079,7 +3079,20 @@ tracker_data_update_statement (const gchar            *graph,
 				return;
 			}
 
+			/* Flush upfront to make a null,x,null,y,z work: When x is set then
+			 * if a null comes, we need to be flushed */
+
+			tracker_data_update_buffer_flush (&new_error);
+			if (new_error) {
+				g_propagate_error (error, new_error);
+				return;
+			}
+
 			delete_all_objects (graph, subject, predicate, error);
+
+			/* Flush at the end to make null, x work. When x arrives the null
+			 * (delete all values of the multivalue) must be flushed */
+
 			tracker_data_update_buffer_flush (&new_error);
 			if (new_error) {
 				g_propagate_error (error, new_error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]