[tracker/tracker-store-queue] Removed support for NULL in tracker_data_delete_statement, not used anymore
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-store-queue] Removed support for NULL in tracker_data_delete_statement, not used anymore
- Date: Fri, 22 May 2009 11:56:10 -0400 (EDT)
commit a9540137ff4cd88586a73c12fc6c6427896fdfcb
Author: Philip Van Hoof <philip codeminded be>
Date: Fri May 22 17:55:34 2009 +0200
Removed support for NULL in tracker_data_delete_statement, not used anymore
---
src/libtracker-data/tracker-data-update.c | 46 +----------------------------
1 files changed, 1 insertions(+), 45 deletions(-)
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index d5dc8e2..bcf1a54 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -707,46 +707,6 @@ delete_metadata_decomposed (gint resource_id,
}
-static void
-delete_metadata_decomposed_all (gint resource_id,
- TrackerProperty *property)
-{
- TrackerDBInterface *iface;
- TrackerDBStatement *stmt;
- gboolean multiple_values;
- const gchar *class_name, *property_name;
- TrackerProperty **super_properties;
-
- iface = tracker_db_manager_get_db_interface ();
-
- multiple_values = tracker_property_get_multiple_values (property);
- class_name = tracker_class_get_name (tracker_property_get_domain (property));
- property_name = tracker_property_get_name (property);
- if (multiple_values) {
- /* delete rows for multiple value properties */
- stmt = tracker_db_interface_create_statement (iface,
- "DELETE FROM \"%s_%s\" WHERE ID = ?",
- class_name, property_name);
- } else {
- /* just set value to NULL for single value properties */
- stmt = tracker_db_interface_create_statement (iface,
- "UPDATE \"%s\" SET \"%s\" = NULL WHERE ID = ?",
- class_name, property_name);
- }
-
- tracker_db_statement_bind_int (stmt, 0, resource_id);
-
- tracker_db_statement_execute (stmt, NULL);
- g_object_unref (stmt);
-
- /* also delete super property values */
- super_properties = tracker_property_get_super_properties (property);
- while (*super_properties) {
- delete_metadata_decomposed_all (resource_id, *super_properties);
- super_properties++;
- }
-}
-
void
tracker_data_delete_statement (const gchar *subject,
const gchar *predicate,
@@ -838,11 +798,7 @@ tracker_data_delete_statement (const gchar *subject,
field = tracker_ontology_get_property_by_uri (predicate);
if (field != NULL) {
- if (object) {
- delete_metadata_decomposed (subject_id, field, object);
- } else {
- delete_metadata_decomposed_all (subject_id, field);
- }
+ delete_metadata_decomposed (subject_id, field, object);
if (object && tracker_property_get_fulltext_indexed (field)) {
TrackerDBInterface *iface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]