EDataBook.BookSqlite.new
Description: Reference for EDataBook.BookSqlite.new

### Constructor

# EDataBook BookSqlitenew

since: 3.12

#### Declaration [src]

    EBookSqlite*
    e_book_sqlite_new (
      const gchar* path,
      ESource* source,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

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

Aside from the manditory fields `E_CONTACT_UID`, `E_CONTACT_REV`, the default configuration stores the following fields for quick performance of searches: `E_CONTACT_FILE_AS`, `E_CONTACT_NICKNAME`, `E_CONTACT_FULL_NAME`, `E_CONTACT_GIVEN_NAME`, `E_CONTACT_FAMILY_NAME`, `E_CONTACT_EMAIL`, `E_CONTACT_TEL`, `E_CONTACT_IS_LIST`, `E_CONTACT_LIST_SHOW_ADDRESSES`, and `E_CONTACT_WANTS_HTML`.

The fields `E_CONTACT_FULL_NAME` and `E_CONTACT_EMAIL` are configured to respond extra quickly with the `E_BOOK_INDEX_PREFIX` index flag.

The fields `E_CONTACT_FILE_AS`, `E_CONTACT_FAMILY_NAME` and `E_CONTACT_GIVEN_NAME` are configured to perform well with the `EbSqlCursor` interface, using the `E_BOOK_INDEX_SORT_KEY` index flag.

Available since: 3.12

#### Parameters

`path`

  Type: `const gchar*`

  Location to load or create the new database.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`source`

  Type: `ESource`

  An optional `ESource`, associated with the `EBookSqlite`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the constructor if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `EBookSqlite`

A reference to an `EBookSqlite`.

The caller of the function takes ownership of the data, and is responsible for freeing it.