[tracker] libtracker-data: Handle NULLs in update solutions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Handle NULLs in update solutions
- Date: Tue, 5 Mar 2019 16:18:43 +0000 (UTC)
commit f0d0ae2f83d6ed4474ab2ed9dcf14b9bb0aebaaf
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Mar 5 11:30:40 2019 +0100
libtracker-data: Handle NULLs in update solutions
This broke in commit bb88e1d39, since it is valid for the cursor
to leave the GValue unset on NULLs in the requested column. We
should just forward the NULL as we used to.
src/libtracker-data/tracker-sparql.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index fcb8a93df..e36d2341e 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -2631,6 +2631,8 @@ get_solution_for_pattern (TrackerSparql *sparql,
g_ascii_dtostr (buf, sizeof (buf),
g_value_get_double (&value));
tracker_solution_add_value (solution, buf);
+ } else if (G_VALUE_TYPE (&value) == G_TYPE_INVALID) {
+ tracker_solution_add_value (solution, NULL);
} else {
g_assert_not_reached ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]