[tracker/wip/carlosg/refcount-in-code: 1/6] libtracker-data: Drop "fts" argument from lowlevel database change handling




commit dda0e80053d077c0e553fb795f99abecbe27328d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Dec 13 16:34:45 2020 +0100

    libtracker-data: Drop "fts" argument from lowlevel database change handling
    
    These are no longer involved in the handling of FTS, and can be removed.

 src/libtracker-data/tracker-data-update.c | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index ef1ea0510..600789b22 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -85,7 +85,6 @@ struct _TrackerDataUpdateBufferProperty {
        const gchar *name;
        GValue value;
        guint date_time : 1;
-       guint fts : 1;
        guint delete_all_values : 1;
 };
 
@@ -146,7 +145,6 @@ static void         cache_insert_value         (TrackerData      *data,
                                                 const gchar      *field_name,
                                                 GValue           *value,
                                                 gboolean          multiple_values,
-                                                gboolean          fts,
                                                 gboolean          date_time);
 static GArray      *get_old_property_values    (TrackerData      *data,
                                                 TrackerProperty  *property,
@@ -572,7 +570,7 @@ cache_ensure_table (TrackerData *data,
                g_value_init (&gvalue, G_TYPE_INT64);
                g_value_set_int64 (&gvalue, get_transaction_modseq (data));
                cache_insert_value (data, "rdfs:Resource", "nrl:modified",
-                                   &gvalue, FALSE, FALSE, FALSE);
+                                   &gvalue, FALSE, FALSE);
        }
 
        table = g_hash_table_lookup (data->resource_buffer->tables, table_name);
@@ -602,7 +600,6 @@ cache_insert_value (TrackerData *data,
                     const gchar *field_name,
                     GValue      *value,
                     gboolean     multiple_values,
-                    gboolean     fts,
                     gboolean     date_time)
 {
        TrackerDataUpdateBufferTable    *table;
@@ -614,7 +611,6 @@ cache_insert_value (TrackerData *data,
 
        g_value_init (&property.value, G_VALUE_TYPE (value));
        g_value_copy (value, &property.value);
-       property.fts = fts;
        property.date_time = date_time;
 
        table = cache_ensure_table (data, table_name, multiple_values);
@@ -637,14 +633,12 @@ static void
 cache_delete_all_values (TrackerData *data,
                          const gchar *table_name,
                          const gchar *field_name,
-                         gboolean     fts,
                          gboolean     date_time)
 {
        TrackerDataUpdateBufferTable    *table;
        TrackerDataUpdateBufferProperty  property = { 0 };
 
        property.name = field_name;
-       property.fts = fts;
        property.date_time = date_time;
        property.delete_all_values = TRUE;
 
@@ -659,7 +653,6 @@ cache_delete_value (TrackerData *data,
                     const gchar *field_name,
                     GValue      *value,
                     gboolean     multiple_values,
-                    gboolean     fts,
                     gboolean     date_time)
 {
        TrackerDataUpdateBufferTable    *table;
@@ -669,7 +662,6 @@ cache_delete_value (TrackerData *data,
 
        g_value_init (&property.value, G_VALUE_TYPE (value));
        g_value_copy (value, &property.value);
-       property.fts = fts;
        property.date_time = date_time;
 
        table = cache_ensure_table (data, table_name, multiple_values);
@@ -1169,7 +1161,7 @@ cache_create_service_decomposed (TrackerData  *data,
 
        g_value_set_int64 (&gvalue, class_id);
        cache_insert_value (data, "rdfs:Resource_rdf:type", "rdf:type",
-                           &gvalue, TRUE, FALSE, FALSE);
+                           &gvalue, TRUE, FALSE);
 
        tracker_data_dispatch_insert_statement_callbacks (data,
                                                          tracker_property_get_id 
(tracker_ontologies_get_rdf_type (ontologies)),
@@ -1218,7 +1210,6 @@ cache_create_service_decomposed (TrackerData  *data,
                                            tracker_property_get_name (*domain_indexes),
                                            v,
                                            tracker_property_get_multiple_values (*domain_indexes),
-                                           tracker_property_get_fulltext_indexed (*domain_indexes),
                                            tracker_property_get_data_type (*domain_indexes) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                }
 
@@ -1691,7 +1682,6 @@ process_domain_indexes (TrackerData     *data,
                                            field_name,
                                            gvalue,
                                            FALSE,
-                                           tracker_property_get_fulltext_indexed (property),
                                            tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                }
                domain_index_classes++;
@@ -1797,7 +1787,6 @@ cache_insert_metadata_decomposed (TrackerData      *data,
                cache_insert_value (data, table_name, field_name,
                                    &value,
                                    multiple_values,
-                                   tracker_property_get_fulltext_indexed (property),
                                    tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
 
                if (!multiple_values) {
@@ -1852,7 +1841,6 @@ delete_metadata_decomposed (TrackerData      *data,
        } else {
                cache_delete_value (data, table_name, field_name,
                                    &value, multiple_values,
-                                   tracker_property_get_fulltext_indexed (property),
                                    tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
 
                if (!multiple_values) {
@@ -1866,7 +1854,6 @@ delete_metadata_decomposed (TrackerData      *data,
                                                            tracker_class_get_name (*domain_index_classes),
                                                            field_name,
                                                            &value, multiple_values,
-                                                           tracker_property_get_fulltext_indexed (property),
                                                            tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                                }
                                domain_index_classes++;
@@ -2009,7 +1996,6 @@ cache_delete_resource_type_full (TrackerData  *data,
                        value_set_remove_value (old_values, old_gvalue);
                        cache_delete_value (data, table_name, field_name,
                                            &copy, multiple_values,
-                                           tracker_property_get_fulltext_indexed (prop),
                                            tracker_property_get_data_type (prop) == 
TRACKER_PROPERTY_TYPE_DATETIME);
 
                        if (!multiple_values) {
@@ -2022,7 +2008,6 @@ cache_delete_resource_type_full (TrackerData  *data,
                                                                    tracker_class_get_name 
(*domain_index_classes),
                                                                    field_name,
                                                                    &copy, multiple_values,
-                                                                   tracker_property_get_fulltext_indexed 
(prop),
                                                                    tracker_property_get_data_type (prop) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                                        }
                                        domain_index_classes++;
@@ -2260,7 +2245,6 @@ tracker_data_delete_all (TrackerData  *data,
                cache_delete_all_values (data,
                                         tracker_property_get_table_name (property),
                                         tracker_property_get_name (property),
-                                        tracker_property_get_fulltext_indexed (property),
                                         tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
        } else {
                cache_delete_value (data,
@@ -2268,7 +2252,6 @@ tracker_data_delete_all (TrackerData  *data,
                                    tracker_property_get_name (property),
                                    &g_array_index (old_values, GValue, 0),
                                    FALSE,
-                                   tracker_property_get_fulltext_indexed (property),
                                    tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
        }
 
@@ -2296,7 +2279,6 @@ delete_single_valued (TrackerData  *data,
                cache_delete_all_values (data,
                                         tracker_property_get_table_name (field),
                                         tracker_property_get_name (field),
-                                        tracker_property_get_fulltext_indexed (field),
                                         tracker_property_get_data_type (field) == 
TRACKER_PROPERTY_TYPE_DATETIME);
        } else if (!multiple_values) {
                GError *inner_error = NULL;
@@ -2310,7 +2292,6 @@ delete_single_valued (TrackerData  *data,
                                            tracker_property_get_name (field),
                                            &g_array_index (old_values, GValue, 0),
                                            FALSE,
-                                           tracker_property_get_fulltext_indexed (field),
                                            tracker_property_get_data_type (field) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                } else {
                        /* no need to error out if statement does not exist for any reason */
@@ -2550,7 +2531,6 @@ tracker_data_update_statement (TrackerData  *data,
                        cache_delete_all_values (data,
                                                 tracker_property_get_table_name (property),
                                                 tracker_property_get_name (property),
-                                                tracker_property_get_fulltext_indexed (property),
                                                 tracker_property_get_data_type (property) == 
TRACKER_PROPERTY_TYPE_DATETIME);
                } else {
                        if (!resource_buffer_switch (data, graph, subject, error))


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