[evolution-data-server/openismus-work-master: 57/74] 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: 57/74] EBookBackendSqliteDB: Fix order by statement for cursor movement.
- Date: Thu, 18 Jul 2013 21:55:47 +0000 (UTC)
commit 5c7e7669f5ffab06e00b244be58dd9551e593b08
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 062e554..566c253 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -5286,6 +5286,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]