[tracker] libtracker-data: Tell TrackerPredicateVariable to return graph if needed
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Tell TrackerPredicateVariable to return graph if needed
- Date: Sat, 17 Nov 2018 17:45:48 +0000 (UTC)
commit aa2c2dace5e2dad7737b594e12c2b86ba1dfcb9b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 17 17:20:38 2018 +0100
libtracker-data: Tell TrackerPredicateVariable to return graph if needed
This got lost in the new parser, fixes a tracker-writeback query involving
variables in graph and predicate. Pointed out by Sam Thursfield on
https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/27#note_367289
Enabling the return_graph variable, we create the appropriate column and
the "no such column: predicate1.graph" error goes away.
src/libtracker-data/tracker-sparql.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index 22ad078dd..ccbd2ca74 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -1078,6 +1078,9 @@ _add_quad (TrackerSparql *sparql,
tracker_binding_set_db_column_name (binding, "predicate");
_add_binding (sparql, binding);
g_object_unref (binding);
+
+ if (!tracker_token_is_empty (graph))
+ pred_var->return_graph = TRUE;
} else {
/* The parser disallows parameter predicates */
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]