[tracker/domain-specific-indexes-review: 15/21] libtracker-data: Fixed deleting a tracker:domainIndex
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/domain-specific-indexes-review: 15/21] libtracker-data: Fixed deleting a tracker:domainIndex
- Date: Wed, 14 Jul 2010 12:56:18 +0000 (UTC)
commit bc581cc528f2bd45f503897657fb9f8302b40823
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Jul 6 15:32:42 2010 +0200
libtracker-data: Fixed deleting a tracker:domainIndex
The normal columns where not being recreated after deleting a
tracker:domainIndex from a class.
src/libtracker-data/tracker-data-manager.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 53f176e..8006536 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -861,9 +861,24 @@ check_for_deleted_domain_index (TrackerClass *class)
if (deleted) {
GSList *l;
+ TrackerProperty **properties;
+ guint n_props, i;
tracker_class_set_db_schema_changed (class, TRUE);
+ properties = tracker_ontologies_get_properties (&n_props);
+ for (i = 0; i < n_props; i++) {
+ if (tracker_property_get_domain (properties[i]) == class &&
+ !tracker_property_get_multiple_values (properties[i])) {
+
+ /* These aren't domain-indexes, but it's just a flag for the
+ * functionality that'll recreate the table to know that the
+ * property must be involved in the recreation and copy */
+
+ tracker_property_set_is_new_domain_index (properties[i], TRUE);
+ }
+ }
+
for (l = hfound; l != NULL; l = l->next) {
TrackerProperty *prop = l->data;
g_debug ("Ontology change: keeping tracker:domainIndex: %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]