[evolution-data-server/openismus-work-master: 53/134] EBookBackendSqliteDB: Fix order by statement for cursor movement.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 53/134] EBookBackendSqliteDB: Fix order by statement for cursor movement.
- Date: Sat, 19 Oct 2013 19:01:28 +0000 (UTC)
commit dafdd0c8edf6a238aa8321db4d1fa5547eaca556
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Tue Jun 18 16:49:44 2013 +0900
EBookBackendSqliteDB: Fix order by statement for cursor movement.
The order by statement must also order the contact UID, since the
UID is used as a tiebreaker between contacts which might be otherwise
identical, the search results must also be ordered by UID.
.../libedata-book/e-book-backend-sqlitedb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c
b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index c0578be..3cfdad7 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -5302,6 +5302,11 @@ ebsdb_cursor_order_by_fragment (EBookBackendSqliteDB *ebsdb,
(sort_types[i] == E_BOOK_SORT_ASCENDING ? "ASC" : "DESC"));
}
+ /* Also order the UID, since it's our tie breaker, we must also order the UID field */
+ if (n_sort_fields > 0)
+ g_string_append (string, ", ");
+ g_string_append_printf (string, "summary.uid %s", reverse ? "DESC" : "ASC");
+
return g_string_free (string, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]