Camel.StoreDB
Description: Reference for Camel.StoreDB

### Class

# CamelStoreDB

since: 3.58

#### Description

    class Camel.StoreDB : Camel.DB
    {
      /* No available fields */
    }

No description available.

Available since: 3.58

#### Hierarchy

#### Ancestors

- CamelDB
- GObject

#### Constructors

###### camel_store_db_new

Creates a new `CamelStoreDB` instance, which uses `filename` as its storage.

since: 3.58

#### Functions

###### camel_store_db_util_get_column_for_header_name

Gets a corresponding messages table column name for the `header_name`.

since: 3.58

#### Instance methods

###### camel_store_db_clear_folder

Clears content of the `folder_name`. It does nothing when the folder does not exist.

since: 3.58

###### camel_store_db_count_messages

Counts `kind` messages in folder `folder_name`.

since: 3.58

###### camel_store_db_delete_folder

Deletes all information about the `folder_name`. It does nothing when the folder does not exist.

since: 3.58

###### camel_store_db_delete_message

Deletes single message with UID `uid` from folder `folder_name`. It’s okay when such `uid` does not exist, but the folder is required to exist.

since: 3.58

###### camel_store_db_delete_messages

Deletes multiple messages with UID `uids` from folder `folder_name`. It’s okay when such `uids` do not exist, but the folder is required to exist.

since: 3.58

###### camel_store_db_dup_deleted_uids

Gets deleted message UID-s in folder `folder_name`. Free the returned array with g_ptr_array_unref(), when no longer needed.

since: 3.58

###### camel_store_db_dup_junk_uids

Gets junk message UID-s in folder `folder_name`. Free the returned array with g_ptr_array_unref(), when no longer needed.

since: 3.58

###### camel_store_db_dup_string_key

Reads a string value for the `key`. If such does not exists, the `NULL` is returned.

since: 3.58

###### camel_store_db_dup_uids_with_flags

Reads message UID-s with their flags in folder `folder_name` and returns it as a hash table with UID-s as a key and the flags as a value.

since: 3.58

###### camel_store_db_get_folder_id

Gets ID of a folder named `folder_name`.

since: 3.58

###### camel_store_db_get_int_key

Reads an integer value for the `key`. If such does not exists, the `def_value` is returned.

since: 3.58

###### camel_store_db_read_folder

Reads information about a folder named `folder_name`, previously stored by the camel_store_db_write_folder(). The data in the `out_record` should be cleared by the camel_store_db_folder_record_clear(), when no longer needed. The function returns success also when the folder information was not saved yet. It can be checked by the folder_id value, which is never zero for those existing tables.

since: 3.58

###### camel_store_db_read_message

Reads information about a single message stored in the `self`. The message in the `out_record` is identified by the folder ID and the UID members of the structure.

since: 3.58

###### camel_store_db_read_messages

Reads information about all messages for the folder `folder_name` and calls the `func` with its `user_data` for each such message information.

since: 3.58

###### camel_store_db_rename_folder

Renames folder `old_folder_name` to `new_folder_name`. Returns failure and sets `G_IO_ERROR_NOT_FOUND` error when the `old_folder_name` does not exist, and `G_IO_ERROR_EXISTS`, when the `new_folder_name` already exists.

since: 3.58

###### camel_store_db_set_int_key

Sets an integer value for the `key` to `value`.

since: 3.58

###### camel_store_db_set_string_key

Sets a string value for the `key` to `value`.

since: 3.58

###### camel_store_db_write_folder

Writes information about a folder as set in the `record`. The “folder_id” member of the `record` is ignored, the same as the “folder_name” member, the folder is identified by the `folder_name` argument.

since: 3.58

###### camel_store_db_write_message

Writes information about a single message into the `self`. The message in the `record` is identified by the `folder_name` argument and the “uid” member of the structure. The “folder_id” member of the `record` is ignored.

since: 3.58

##### Methods inherited from CamelDB (15)

###### camel_db_abort_transaction

Ends an ongoing transaction by ignoring the changes.

since: 3.58

###### camel_db_begin_transaction

Begins transaction. End it with `camel_db_end_transaction()` or camel_db_abort_transaction().

since: 3.58

###### camel_db_end_transaction

Ends an ongoing transaction by committing the changes.

since: 3.58

###### camel_db_exec_select

Executes a SELECT statement and calls the `callback` for each selected row.

since: 3.58

###### camel_db_exec_statement

Executes an SQLite statement.

since: 3.58

###### camel_db_get_filename

No description available.

since: 3.24

###### camel_db_has_table

Checks whether the `table_name` exists in the `cdb`.

since: 3.58

###### camel_db_has_table_with_column

Checks whether the `table_name` exists in the `cdb` and contains column named `column_name`.

since: 3.58

###### camel_db_maybe_run_maintenance

Runs a `cdb` maintenance, which includes vacuum, if necessary.

since: 3.16

###### camel_db_open

Opens the database stored as `filename`. The function can be called only once, all following calls will result into failures.

since: 3.58

###### camel_db_reader_lock

Acquires a reader lock on the `cdb`. It can be called multiple times. Call pair function `camel_db_reader_unlock()` to release it. it’s okay to call this function when a writer lock is already acquired by the calling thread.

since: 3.58

###### camel_db_reader_unlock

Releases a reader lock on the `cdb` previously acquired by calling camel_db_reader_lock().

since: 3.58

###### camel_db_set_collate

Defines a collation `collate`, which can be used in SQL (SQLite) statement as a collation function. The `func` is called when colation is used.

since: 2.24

###### camel_db_writer_lock

Acquires a writer lock on the `cdb`. It can be called multiple times. Call pair function `camel_db_writer_unlock()` to release it.

since: 3.58

###### camel_db_writer_unlock

Releases a write lock on the `cdb` previously acquired by calling camel_db_writer_lock().

since: 3.58

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

Please see GObject for a full list of methods.

#### Signals

##### 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 CamelStoreDBClass {
      CamelDBClass parent_class;
      gpointer reserved;

    }

No description available.

###### Class members

`parent_class: CamelDBClass`

  No description available.

`reserved: gpointer`

  No description available.