[tracker/wip/carlosg/portal: 6/29] libtracker-data: Filter find_graph() by the given constraints



commit d26b062d1d8c5d560ad0e1f4cfd6f4ce02058eaf
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jan 23 18:24:08 2020 +0100

    libtracker-data: Filter find_graph() by the given constraints

 src/libtracker-data/tracker-sparql.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index 8d4fe9511..1108d9320 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -779,6 +779,14 @@ static gint
 tracker_sparql_find_graph (TrackerSparql *sparql,
                            const gchar   *name)
 {
+       GHashTable *effective_graphs;
+
+       effective_graphs = tracker_sparql_get_effective_graphs (sparql);
+       if (!effective_graphs ||
+           !g_hash_table_contains (effective_graphs, name)) {
+               return 0;
+       }
+
        return tracker_data_manager_find_graph (sparql->data_manager, name);
 }
 


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