summaryrefslogtreecommitdiff
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2015-04-16 10:00:18 +0200
committerMilan Crha <mcrha@redhat.com>2015-04-16 10:00:18 +0200
commit0ec5c954137f336a2b46a852ac247cc9f1038540 (patch)
tree1f5c3630bc745d623815b4737d4cadf185f7b6bb /addressbook
parent3bd238d4c5c121e809e5d586991667bc8259368f (diff)
downloadevolution-data-server-0ec5c954137f336a2b46a852ac247cc9f1038540.tar.gz
Bug 696552 - exists_vcard query fails with get_contacts_sync()
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/libedata-book/e-book-sqlite.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/addressbook/libedata-book/e-book-sqlite.c b/addressbook/libedata-book/e-book-sqlite.c
index d96a4ba77..bc9d6b0d1 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -3926,6 +3926,7 @@ typedef enum {
enum {
/* 'exists' is a supported query on a field, but not part of EBookQueryTest */
BOOK_QUERY_EXISTS = E_BOOK_QUERY_LAST,
+ BOOK_QUERY_EXISTS_VCARD,
/* From here the compound types start */
BOOK_QUERY_SUB_AND,
@@ -3938,6 +3939,7 @@ enum {
#define EBSQL_QUERY_TYPE_STR(query) \
((query) == BOOK_QUERY_EXISTS ? "exists" : \
+ (query) == BOOK_QUERY_EXISTS_VCARD ? "exists_vcard" : \
(query) == BOOK_QUERY_SUB_AND ? "AND" : \
(query) == BOOK_QUERY_SUB_OR ? "OR" : \
(query) == BOOK_QUERY_SUB_NOT ? "NOT" : \
@@ -4337,6 +4339,7 @@ static const struct {
{ "regex_normal", FALSE, E_BOOK_QUERY_REGEX_NORMAL },
{ "regex_raw", FALSE, E_BOOK_QUERY_REGEX_RAW },
{ "exists", FALSE, BOOK_QUERY_EXISTS },
+ { "exists_vcard", FALSE, BOOK_QUERY_EXISTS_VCARD }
};
/* Cheat our way into passing mode data to these funcs */
@@ -4813,6 +4816,17 @@ query_preflight_check (PreflightContext *context,
break;
+ case BOOK_QUERY_EXISTS_VCARD:
+ /* Exists vCard queries only supported in the fallback */
+ context->status = MAX (context->status, PREFLIGHT_NOT_SUMMARIZED);
+ EBSQL_NOTE (
+ PREFLIGHT,
+ g_printerr (
+ "PREFLIGHT CHECK: "
+ "Exists vCard requires full data, new status: %s\n",
+ EBSQL_STATUS_STR (context->status)));
+ break;
+
case E_BOOK_QUERY_REGEX_RAW:
/* Raw regex queries only supported in the fallback */
context->status = MAX (context->status, PREFLIGHT_NOT_SUMMARIZED);
@@ -5358,6 +5372,7 @@ static const GenerateFieldTest field_test_func_table[] = {
field_test_query_regex_normal, /* E_BOOK_QUERY_REGEX_NORMAL */
NULL /* Requires fallback */, /* E_BOOK_QUERY_REGEX_RAW */
field_test_query_exists, /* BOOK_QUERY_EXISTS */
+ NULL /* Requires fallback */ /* BOOK_QUERY_EXISTS_VCARD */
};
/**********************************************************