Commit c4fb44b3 authored by Martyn James Russell's avatar Martyn James Russell

Remove collation from Services table.

	* data/db/sqlite-service.sql:
	* src/libtracker-db/tracker-db-manager.c: Remove collation from
	Services table.

svn path=/trunk/; revision=3013
parent 74133b7a
2009-03-03 Martyn Russell <martyn@imendio.com>
* data/db/sqlite-service.sql:
* src/libtracker-db/tracker-db-manager.c: Remove collation from
Services table.
2009-03-03 Carlos Garnacho <carlos@imendio.com>
* src/tracker-indexer/tracker-indexer.[ch]: Make the indexer decide
......
......@@ -3,8 +3,8 @@ CREATE TABLE Services
(
ID Integer primary key not null,
ServiceTypeID Integer default 0, /* see ServiceTypes table above for ID values. A value of 0 indicates a group resource rather than a service */
Path Text not null COLLATE UTF8, /* non-file objects should use service name here */
Name Text default ' ' COLLATE UTF8, /* name of file or object - the combination path and name must be unique for all objects */
Path Text not null, /* non-file objects should use service name here */
Name Text default ' ', /* name of file or object - the combination path and name must be unique for all objects */
Enabled Integer default 1,
Mime Text default ' ',
Size Integer default 0,
......
......@@ -1258,28 +1258,6 @@ db_get_xesam_mime_prefixes_for_service_id (TrackerDBInterface *iface,
return db_mime_query (iface, "GetXesamMimePrefixForServiceId", service_id);
}
/* Sqlite utf-8 user defined collation sequence */
static gint
utf8_collation_func (gchar *str1,
gint len1,
gchar *str2,
int len2)
{
gchar *word1, *word2;
gint result;
/* Collate words */
word1 = g_utf8_collate_key_for_filename (str1, len1);
word2 = g_utf8_collate_key_for_filename (str2, len2);
result = strcmp (word1, word2);
g_free (word1);
g_free (word2);
return result;
}
/* Converts date/time in UTC format to ISO 8160 standardised format for display */
static GValue
function_date_to_str (TrackerDBInterface *interface,
......@@ -1703,12 +1681,6 @@ db_set_params (TrackerDBInterface *iface,
if (add_functions) {
g_message (" Adding functions (FormatDate, etc)");
if (!tracker_db_interface_sqlite_set_collation_function (TRACKER_DB_INTERFACE_SQLITE (iface),
"UTF8",
utf8_collation_func)) {
g_critical ("Collation sequence failed");
}
/* Create user defined functions that can be used in sql */
tracker_db_interface_sqlite_create_function (iface,
"FormatDate",
......
......@@ -1428,13 +1428,13 @@ item_add_or_update (TrackerIndexer *indexer,
dirname,
basename);
/*
* "metadata" (new metadata) contains embedded props and can contain
/* "metadata" (new metadata) contains embedded props and can contain
* non-embedded properties with default values! Dont overwrite those
* in the DB if they already has a value.
*
* 1) Remove all old embedded metadata from index and DB
* 2) Remove from new metadata all non embedded properties that already have value.
* 2) Remove from new metadata all non embedded
* properties that already have value.
* 3) Save the remain new metadata.
*/
old_metadata_emb = tracker_data_query_metadata (service, id, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment