EDataBook.BookSqlite
Description: Reference for EDataBook.BookSqlite

### Class

# EDataBookBookSqlite

since: 3.12

#### Description

    class EDataBook.BookSqlite : GObject.Object
      implements EDataServer.Extensible {
      /* No available fields */
    }

No description available.

Available since: 3.12

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- EExtensible

#### Constructors

###### e_book_sqlite_new

Creates a new `EBookSqlite` with the default summary configuration.

since: 3.12

###### e_book_sqlite_new_full

Opens or creates a new addressbook at `path`.

since: 3.12

#### Functions

###### e_book_sqlite_error_quark

No description available.

###### e_book_sqlite_search_data_free

Frees an `EbSqlSearchData`.

since: 3.12

#### Instance methods

###### e_book_sqlite_add_contact

No description available.

###### e_book_sqlite_add_contacts

Adds or replaces contacts in `ebsql`. If `replace_existing` is specified then existing contacts with the same UID will be replaced, otherwise adding an existing contact will return an error.

since: 3.12

###### e_book_sqlite_count_query

Counts how many contacts satisfy the `sexp`.

since: 3.50

###### e_book_sqlite_cursor_calculate

Calculates the `total` amount of results for the `cursor`‘s query expression, as well as the current `position` of `cursor` in the results. `position` is represented as the amount of results which lead up to the current value of `cursor`, if `cursor` currently points to an exact contact, the position also includes the cursor contact.

since: 3.12

###### e_book_sqlite_cursor_compare_contact

Compares `contact` with `cursor` and returns whether `contact` is less than, equal to, or greater than `cursor`.

since: 3.12

###### e_book_sqlite_cursor_free

Frees `cursor`.

since: 3.12

###### e_book_sqlite_cursor_new

Creates a new `EbSqlCursor`.

since: 3.12

###### e_book_sqlite_cursor_set_sexp

Modifies the current query expression for `cursor`. This will not modify `cursor`‘s state, but will change the outcome of any further calls to `e_book_sqlite_cursor_calculate()` or e_book_sqlite_cursor_step().

since: 3.12

###### e_book_sqlite_cursor_set_target_alphabetic_index

Sets the `cursor` position to an Alphabetic Index into the alphabet active in `ebsql`‘s locale.

since: 3.12

###### e_book_sqlite_cursor_step

Steps `cursor` through its sorted query by a maximum of `count` contacts starting from `origin`.

since: 3.12

###### e_book_sqlite_dup_query_contacts

Queries the `ebsql` for the contacts in the given range and order. The `sort_field` should be in the summary, otherwise an error is returned.

since: 3.50

###### e_book_sqlite_dup_query_field

Queries the `ebsql` for a `summary_field` value for contacts in the given range and order. To get complete contacts use e_book_sqlite_dup_query_contacts(). Note the field value may not correspond precisely to the value stored in the vCard (it can be in lower case).

since: 3.50

###### e_book_sqlite_dup_summary_field

Queries the `ebsql` for a `summary_field` value for contact with UID `uid`. Note the field value may not correspond precisely to the value stored in the vCard (it can be in lower case).

since: 3.50

###### e_book_sqlite_exec

Executes an SQLite statement. Use `e_book_sqlite_select()` for SELECT statements.

since: 3.48

###### e_book_sqlite_get_contact

Fetch the `EContact` specified by `uid` in `ebsql`.

since: 3.12

###### e_book_sqlite_get_contact_extra

Fetches the extra data previously set for `uid`, either with `e_book_sqlite_set_contact_extra()` or when adding contacts.

since: 3.12

###### e_book_sqlite_get_key_value

Fetches the value for `key` and stores it in `value`.

since: 3.12

###### e_book_sqlite_get_key_value_int

A convenience function to fetch the value of `key` as an integer.

since: 3.12

###### e_book_sqlite_get_locale

Fetches the current locale setting for the address-book.

since: 3.12

###### e_book_sqlite_get_vcard

Fetch a vcard string for `uid` in `ebsql`.

since: 3.12

###### e_book_sqlite_has_contact

Checks if a contact bearing the UID indicated by `uid` is stored in `ebsql`.

since: 3.12

###### e_book_sqlite_lock

Obtains an exclusive lock on `ebsql` and starts a transaction.

since: 3.12

###### e_book_sqlite_ref_collator

References the currently active `ECollator` for `ebsql`, use `e_collator_unref()` when finished using the returned collator.

since: 3.12

###### e_book_sqlite_ref_source

References the `ESource` to which `ebsql` is paired, use `g_object_unref()` when finished using the source. It can be `NULL` in some cases, like when running tests.

since: 3.16

###### e_book_sqlite_remove_contact

Removes the contact indicated by `uid` from `ebsql`.

since: 3.12

###### e_book_sqlite_remove_contacts

Removes the contacts indicated by `uids` from `ebsql`.

since: 3.12

###### e_book_sqlite_search

Searches `ebsql` for contacts matching the search expression indicated by `sexp`.

since: 3.12

###### e_book_sqlite_search_uids

Similar to e_book_sqlitedb_search(), but fetches only a list of contact UIDs.

since: 3.12

###### e_book_sqlite_select

Executes a SELECT statement `sql_stmt` and calls `func` for each row of the result. Use `e_book_sqlite_exec()` for statements which do not return row sets.

since: 3.48

###### e_book_sqlite_set_contact_extra

Sets or replaces the extra data associated with `uid`.

since: 3.12

###### e_book_sqlite_set_key_value

Sets the value for `key` to be `value`.

since: 3.12

###### e_book_sqlite_set_key_value_int

A convenience function to set the value of `key` as an integer.

since: 3.12

###### e_book_sqlite_set_locale

Relocalizes any locale specific data in the specified new `lc_collate` locale.

since: 3.12

###### e_book_sqlite_unlock

Releases an exclusive on `ebsql` and finishes a transaction previously started with e_book_sqlite_lock_updates().

since: 3.12

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from EExtensible (3)

###### e_extensible_list_extensions

Returns a list of `EExtension` objects bound to `extensible` whose types are ancestors of `extension_type`. For a complete list of extension objects bound to `extensible`, pass `E_TYPE_EXTENSION`.

###### e_extensible_load_extensions

Creates an instance of all instantiable subtypes of `EExtension` which target the class of `extensible`. The lifetimes of these newly created `EExtension` objects are bound to `extensible` such that they are finalized when `extensible` is finalized.

###### e_extensible_reload_extensions

Similar to e_extensible_load_extensions(), only loads newly discovered extensions again. This can help in case a new module had been loaded to the process, which provides the extensions for the `extensible`.

#### Signals

###### EDataBook.BookSqlite::before-insert-contact

No description available.

###### EDataBook.BookSqlite::before-remove-contact

No description available.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct EDataBookBookSqliteClass {
      gboolean (* before_insert_contact) (
        EBookSqlite* ebsql,
        gpointer db,
        EContact* contact,
        const gchar* extra,
        gboolean replace,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* before_remove_contact) (
        EBookSqlite* ebsql,
        gpointer db,
        const gchar* contact_uid,
        GCancellable* cancellable,
        GError** error
      );

    }

Class structure for the `EBookSqlite` class.

###### Class members

`before_insert_contact: gboolean (* before_insert_contact) ( EBookSqlite* ebsql, gpointer db, EContact* contact, const gchar* extra, gboolean replace, GCancellable* cancellable, GError** error )`

  No description available.

`before_remove_contact: gboolean (* before_remove_contact) ( EBookSqlite* ebsql, gpointer db, const gchar* contact_uid, GCancellable* cancellable, GError** error )`

  No description available.

#### Virtual methods

###### EDataBook.BookSqliteClass.before_insert_contact

No description available.

###### EDataBook.BookSqliteClass.before_remove_contact

No description available.