[tracker/wip/carlosg/sparql1.1: 49/80] libtracker-data: Set sample binding early on variable objects



commit 57dc9c4bcb4ee3bcb38e349fa9acdfda88ee21bf
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jun 15 18:08:55 2019 +0200

    libtracker-data: Set sample binding early on variable objects

 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 f27087034..c78d90136 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -1252,6 +1252,8 @@ _add_quad (TrackerSparql  *sparql,
                binding = tracker_variable_binding_new (variable,
                                                        property ? tracker_property_get_range (property) : 
NULL,
                                                        table);
+               if (!tracker_variable_has_bindings (variable))
+                       tracker_variable_set_sample_binding (variable, TRACKER_VARIABLE_BINDING (binding));
 
                if (tracker_token_get_variable (predicate)) {
                        tracker_binding_set_data_type (binding, TRACKER_PROPERTY_TYPE_STRING);


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