[evolution-data-server/openismus-work-3-8: 68/121] 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-3-8: 68/121] EBookBackendSqliteDB: Fix order by statement for cursor movement.
- Date: Thu, 3 Oct 2013 22:24:41 +0000 (UTC)
commit 2cf8a861742b94a43d305353acf3ffc06cb44824
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 c2b73d8..8b84be7 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -5287,6 +5287,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]