[tracker] libtracker-data: Add UNIQUE index for inverse functional properties



commit dce9da1e18a4f6e678c39551a8b670e297639f83
Author: Jürg Billeter <j bitron ch>
Date:   Thu Nov 5 15:36:57 2009 +0100

    libtracker-data: Add UNIQUE index for inverse functional properties

 src/libtracker-data/tracker-data-manager.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index bb0a9eb..ee92b77 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -711,6 +711,9 @@ create_decomposed_metadata_tables (TrackerDBInterface *iface,
 				g_string_append_printf (sql, ", \"%s\" %s", 
 							tracker_property_get_name (*property), 
 							sql_type_for_single_value);
+				if (tracker_property_get_is_inverse_functional_property (*property)) {
+					g_string_append (sql, " UNIQUE");
+				}
 			}
 		}
 	}



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