[evolution-data-server/openismus-work-master: 53/122] 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/122] EBookBackendSqliteDB: Fix order by statement for cursor movement.
- Date: Mon, 14 Oct 2013 20:35:45 +0000 (UTC)
commit 42e2056b116ed664d78a5f93e85a0547b09ce0e8
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 7481d2d..9d09563 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]