[tracker/fts4: 9/21] libtracker-data: remove useless FTS functions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/fts4: 9/21] libtracker-data: remove useless FTS functions
- Date: Mon, 4 Feb 2013 10:02:52 +0000 (UTC)
commit bfde9a623bf5bf8f8e1235b3f455b3ae4f9b9e29
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Nov 7 15:16:32 2011 +0100
libtracker-data: remove useless FTS functions
commit/rollback should happen now with the rest of the
operations, and update_init() isn't necessary anymore.
src/libtracker-data/tracker-data-manager.c | 9 ++++++++-
src/libtracker-data/tracker-data-update.c | 2 --
src/libtracker-data/tracker-db-interface-sqlite.c | 16 ----------------
3 files changed, 8 insertions(+), 19 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 7270126..1a9824e 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3582,6 +3582,7 @@ load_ontologies_gvdb (GError **error)
g_free (filename);
}
+#if HAVE_TRACKER_FTS
static gint
compare_fts_property_ids (gconstpointer a,
gconstpointer b)
@@ -3627,6 +3628,7 @@ ontology_get_fts_properties (gboolean only_new)
return prop_names;
}
+#endif
gboolean
tracker_data_manager_init (TrackerDBManagerFlags flags,
@@ -3805,7 +3807,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
#endif /* DISABLE_JOURNAL */
if (is_first_time_index && !read_only) {
+#if HAVE_TRACKER_FTS
const gchar **fts_props;
+#endif
sorted = get_ontologies (test_schemas != NULL, ontologies_dir);
@@ -3895,10 +3899,11 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
return FALSE;
}
+#if HAVE_TRACKER_FTS
fts_props = ontology_get_fts_properties (FALSE);
- /* This is a no-op when FTS is disabled */
tracker_db_interface_sqlite_fts_init (iface, fts_props, TRUE);
g_free (fts_props);
+#endif
tracker_data_ontology_import_into_db (FALSE,
&internal_error);
@@ -4045,8 +4050,10 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
}
}
+#if HAVE_TRACKER_FTS
/* This is a no-op when FTS is disabled */
tracker_db_interface_sqlite_fts_init (iface, NULL, FALSE);
+#endif
}
if (check_ontology) {
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index e4accfa..269b848 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1060,7 +1060,6 @@ tracker_data_update_buffer_clear (void)
resource_buffer = NULL;
#if HAVE_TRACKER_FTS
- tracker_db_interface_sqlite_fts_update_rollback (iface);
update_buffer.fts_ever_updated = FALSE;
#endif
@@ -3378,7 +3377,6 @@ tracker_data_commit_transaction (GError **error)
#if HAVE_TRACKER_FTS
if (update_buffer.fts_ever_updated) {
- tracker_db_interface_sqlite_fts_update_commit (iface);
update_buffer.fts_ever_updated = FALSE;
}
#endif
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index 7314d18..16b1c84 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -1017,13 +1017,6 @@ tracker_db_interface_sqlite_fts_alter_table (TrackerDBInterface *db_interface,
}
}
-int
-tracker_db_interface_sqlite_fts_update_init (TrackerDBInterface *db_interface,
- int id)
-{
- return 0;
-}
-
gboolean
tracker_db_interface_sqlite_fts_update_text (TrackerDBInterface *db_interface,
int id,
@@ -1122,15 +1115,6 @@ tracker_db_interface_sqlite_fts_delete_text (TrackerDBInterface *db_interface,
return TRUE;
}
-void
-tracker_db_interface_sqlite_fts_update_commit (TrackerDBInterface *db_interface)
-{
-}
-
-void
-tracker_db_interface_sqlite_fts_update_rollback (TrackerDBInterface *db_interface)
-{
-}
#endif
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]