[tracker/wip/carlosg/graphs-through-with: 8/15] libtracker-data: Drop fts5 union views



commit 8f51ca9a0ac51b3e321d8cc751045c16fcc90a01
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Nov 23 16:43:46 2019 +0100

    libtracker-data: Drop fts5 union views
    
    Those are now unused, in favor of subqueries through the WITH clause.

 src/libtracker-data/tracker-data-manager.c | 38 ------------------------------
 1 file changed, 38 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index fbd43d86c..41d4b4c47 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -4078,44 +4078,6 @@ tracker_data_manager_update_union_views (TrackerDataManager  *manager,
                g_hash_table_insert (view_generations, name, generation);
        }
 
-       /* Update FTS5 union view */
-       if ((!tables || g_hash_table_contains (tables, "fts5")) &&
-           g_hash_table_lookup (view_generations, "fts5") != generation) {
-               stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, 
&inner_error,
-                                                             "DROP VIEW IF EXISTS temp.\"unionGraph_fts5\"");
-               if (!stmt)
-                       goto error;
-
-               tracker_db_statement_execute (stmt, NULL);
-               g_object_unref (stmt);
-
-               str = g_string_new (NULL);
-               g_string_append (str,
-                                "CREATE VIEW temp.\"unionGraph_fts5\" AS "
-                                "SELECT 0 AS graph, ROWID, *, fts5, rank FROM \"main\".\"fts5\" ");
-
-               g_hash_table_iter_init (&iter, graphs);
-               while (g_hash_table_iter_next (&iter, &graph_name, &graph_id)) {
-                       g_string_append_printf (str, "UNION ALL SELECT %d AS graph, ROWID, *, fts5, rank FROM 
\"%s\".\"fts5\" ",
-                                               GPOINTER_TO_INT (graph_id),
-                                               (gchar *) graph_name);
-               }
-
-               stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, 
&inner_error,
-                                                             "%s", str->str);
-               g_string_free (str, TRUE);
-
-               if (stmt) {
-                       tracker_db_statement_execute (stmt, &inner_error);
-                       g_object_unref (stmt);
-               }
-
-               if (inner_error)
-                       goto error;
-
-               g_hash_table_insert (view_generations, g_strdup ("fts5"), generation);
-       }
-
        /* Refcounts */
        if (g_hash_table_lookup (view_generations, "refcount") != generation) {
                stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, 
&inner_error,


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