summaryrefslogtreecommitdiff
path: root/camel/camel-search-sql.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-07-24 19:56:33 +0000
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-07-24 19:56:33 +0000
commit1f3669691e83b308192c5ce333457c7dc2bc1eb3 (patch)
tree30328258f83469576b60a70536f04157ea52615e /camel/camel-search-sql.c
parentb9c9e74ab65aed24367860223f0d50d78abb0143 (diff)
downloadevolution-data-server-1f3669691e83b308192c5ce333457c7dc2bc1eb3.tar.gz
Further improve search.
2008-07-25 Srinivasa Ragavan <sragavan@novell.com> * camel/camel-search-sql.c: Further improve search. svn path=/trunk/; revision=9180
Diffstat (limited to 'camel/camel-search-sql.c')
-rw-r--r--camel/camel-search-sql.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/camel/camel-search-sql.c b/camel/camel-search-sql.c
index 6a2f19534..bac08f129 100644
--- a/camel/camel-search-sql.c
+++ b/camel/camel-search-sql.c
@@ -71,7 +71,7 @@ static GScannerConfig config =
"_-0123456789"
G_CSET_A_2_Z
) /* cset_identifier_nth */,
- ( "\n" ) /* cpair_comment_single */,
+ ( "" ) /* cpair_comment_single */,
FALSE /* case_sensitive */,
TRUE /* skip_comment_multi */,
TRUE /* skip_comment_single */,
@@ -752,17 +752,17 @@ camel_sexp_to_sql (const char *txt)
return sql;
}
- while (all->next) {
+ while (all) {
n1 = tmp->data;
all = g_list_delete_link (all, all);
tmp = all;
-
+ d(printf("coming %s\n", n1->exact_token));
if (n1->operator) {
if (res->next) {
GList *ts=res;
Node *n = ts->data;
GString *s = g_string_new (NULL);
-
+
g_string_append_printf (s, "(%s", n->exact_token);
ts = ts->next;
while (ts) { /* should have atleast 2 nodes */
@@ -786,6 +786,7 @@ camel_sexp_to_sql (const char *txt)
tmp = all;
} else {
res = g_list_prepend (res, n1);
+ d(printf("app %s\n", n1->exact_token));
}
}
@@ -899,6 +900,7 @@ int main ()
"(match-all (not (system-flag \"deleted\")))",
"(match-all (system-flag \"seen\"))",
"(match-all (and (match-all #t) (system-flag \"deleted\")))",
+ "(match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))"
};