Rygel.Database.Database – librygel-db Reference Manual

# Database

## Object Hierarchy:

## Description:

public class Database : Object, Initable

This class is a thin wrapper around SQLite's database object.

It adds statement preparation based on GValue and a cancellable exec function.

Namespace: Rygel.Database
Package: librygel-db

## Content:

### Properties:

- public string name { construct set; }
- public Flavor flavor { construct set; }
- public Flags flags { construct set; }

### Static methods:

- public static void utf8_contains (Context context, Value[] args)
  Function to implement the custom SQL function 'contains'
- public static int utf8_collate (int alen, void* a, int blen, void* b)
  Function to implement the custom SQLite collation 'CASEFOLD'.

### Creation methods:

- public Database (string name, Flavor flavor = CACHE, Flags flags = READ_WRITE) throws DatabaseError, Error
  Connect to a SQLite database file

### Methods:

- public bool init (Cancellable? cancellable = null) throws Error
  Initialize database. Implemented for Initiable interface.
- public Cursor exec_cursor (string sql, Value[]? arguments = null) throws DatabaseError
  SQL query function.
- public void exec (string sql, Value[]? arguments = null) throws DatabaseError
  Simple SQL query execution function.
- public int query_value (string sql, Value[]? args = null) throws DatabaseError
  Execute a SQL query that returns a single number.
- public void analyze ()
  Analyze triggers of database
- public void begin () throws DatabaseError
  Start a transaction
- public void commit () throws DatabaseError
  Commit a transaction
- public void rollback ()
  Rollback a transaction
- public bool is_empty () throws DatabaseError
  Check for an empty SQLite database.

### Inherited Members:

All known members inherited from class GLib.Object

- interface_find_property
- interface_install_property
- interface_list_properties
- @new
- new_valist
- newv
- new_with_properties
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating

- freeze_notify
- @get
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- is_floating
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set

- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
- notify
- ref_count

All known members inherited from interface GLib.Initable

- @new
- new_valist

- newv

- init