[evolution-data-server/openismus-work-3-8: 101/116] EBookBackendSqliteDB: Handle new transliterated queries.



commit ffd94c6113e8a8f1170da6708af19c774074d7ae
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Tue Aug 27 13:49:31 2013 +0200

    EBookBackendSqliteDB: Handle new transliterated queries.
    
    For now transliterated normalized strings are not stored in the summary,
    just fallback on EBookBackendSexp for these queries.

 .../libedata-book/e-book-backend-sqlitedb.c        |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c 
b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index f28e513..e044225 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -3152,6 +3152,22 @@ func_check_regex_raw (struct _ESExp         *f,
        return r;
 }
 
+static ESExpResult *
+func_check_translit (struct _ESExp *f,
+                    gint argc,
+                    struct _ESExpResult **argv,
+                    gpointer data)
+{
+       /* Transliterated strings are not in the summary
+        */
+       ESExpResult *r;
+
+       r = e_sexp_result_new (f, ESEXP_RES_INT);
+       r->value.number = 0;
+
+       return r;
+}
+
 /* 'builtin' functions */
 static const struct {
        const gchar *name;
@@ -3172,6 +3188,10 @@ static const struct {
        { "eqphone_short", func_check_phone, 0 },
        { "regex_normal", func_check, 0 },
        { "regex_raw", func_check_regex_raw, 0 },
+       { "translit_contains", func_check_translit, 0 },
+       { "translit_is", func_check_translit, 0 },
+       { "translit_beginswith", func_check_translit, 0 },
+       { "translit_endswith", func_check_translit, 0 },
 };
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]