EBookBackendSqliteDB: Added e_book_backend_sqlitedb_new_full()
authorTristan Van Berkom <tristanvb@openismus.com>
Wed, 7 Nov 2012 08:19:57 +0000 (17:19 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Thu, 22 Nov 2012 03:55:04 +0000 (12:55 +0900)
commitccaf242b99a27416bc9f382f7e674748e9bffe26
tree2398e8c23f1ca8207cf4b209aefe2bef0e2d1267
parent844f1b7168f00ab5a720c99dfbd099f2b86d44eb
EBookBackendSqliteDB: Added e_book_backend_sqlitedb_new_full()

This is a major refactor of EBookBackendSqliteDB and adds a few
features. The new_full() variant for creating the SQLiteDB makes
the summary fields and indexes configurable.

String types, Boolean Types and Attribute List types of EContactFields
are all supported by the summary.

The summary fields can all have Prefix or Suffix indexes.

In order to actually hit the created indexes, all field data
is normalized with g_utf8_casefold(), for Suffix indexes,
additional columns are maintained with the data in reverse
(this allows us to run prefix searches in reverse which use
the indexes when asked to perform a suffix search)

Furthermore the patch also deprecates:
   e_book_backend_sqlitedb_is_summary_query () and
   e_book_backend_sqlitedb_is_summary_fields ()
in favour of some new apis which take the given EBookBackendSqliteDB in context.

Note also that since attribute list summary fields are supported,
we've dropped the custom hackery which checks related email_1, email_2, email_3
and email_4 fields... instead the E_CONTACT_EMAIL field should simply
be used to store however many emails are assigned to a given contact.
addressbook/libedata-book/e-book-backend-sqlitedb.c
addressbook/libedata-book/e-book-backend-sqlitedb.h