Top | ![]() |
![]() |
![]() |
![]() |
RygelDatabaseDatabaseRygelDatabaseDatabase — This class is a thin wrapper around SQLite's database object. |
RygelDatabaseFlags | flags | Write / Construct |
RygelDatabaseFlavor | flavor | Write / Construct |
char * | name | Write / Construct |
#define | RYGEL_DATABASE_TYPE_DATABASE |
struct | RygelDatabaseDatabase |
struct | RygelDatabaseDatabaseClass |
enum | RygelDatabaseFlavor |
enum | RygelDatabaseFlags |
enum | RygelDatabaseDatabaseError |
GEnum ├── RygelDatabaseFlags ╰── RygelDatabaseFlavor GObject ╰── RygelDatabaseDatabase
RygelDatabaseCursor * rygel_database_database_exec_cursor (RygelDatabaseDatabase *self
,const gchar *sql
,GValue *arguments
,gint arguments_length1
,GError **error
);
SQL query function.
Use for all queries that return a result set.
RygelDatabaseDatabaseError will be returned in error
if the underlying SQLite operation fails.
self |
the RygelDatabaseDatabase instance |
|
sql |
. The SQL query to run. . |
[in] |
arguments |
. Values to bind in the SQL query or null. . |
[in][allow-none][array length=arguments_length1] |
arguments_length1 |
length of the |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
void rygel_database_database_exec (RygelDatabaseDatabase *self
,const gchar *sql
,GValue *arguments
,gint arguments_length1
,GError **error
);
Simple SQL query execution function.
Use for all queries that don't return anything.
RygelDatabaseDatabaseError will be returned in error
if the underlying SQLite operation fails.
self |
the RygelDatabaseDatabase instance |
|
sql |
. The SQL query to run. . |
[in] |
arguments |
. Values to bind in the SQL query or null. . |
[in][allow-none][array length=arguments_length1] |
arguments_length1 |
length of the |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
gint rygel_database_database_query_value (RygelDatabaseDatabase *self
,const gchar *sql
,GValue *args
,gint args_length1
,GError **error
);
Execute a SQL query that returns a single number.
RygelDatabaseDatabaseError will be returned in error
if the underlying SQLite operation fails.
self |
the RygelDatabaseDatabase instance |
|
sql |
. The SQL query to run. . |
[in] |
args |
. Values to bind in the SQL query or null. . |
[in][allow-none][array length=args_length1] |
args_length1 |
length of the |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
void
rygel_database_database_analyze (RygelDatabaseDatabase *self
);
Analyze triggers of database
void rygel_database_database_begin (RygelDatabaseDatabase *self
,GError **error
);
Start a transaction
self |
the RygelDatabaseDatabase instance |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
void rygel_database_database_commit (RygelDatabaseDatabase *self
,GError **error
);
Commit a transaction
self |
the RygelDatabaseDatabase instance |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
void
rygel_database_database_rollback (RygelDatabaseDatabase *self
);
Rollback a transaction
gboolean rygel_database_database_is_empty (RygelDatabaseDatabase *self
,GError **error
);
Check for an empty SQLite database.
RygelDatabaseDatabaseError will be returned in error
if the SQLite meta table does not exist which usually indicates that the file is not a databsae
self |
the RygelDatabaseDatabase instance |
|
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
RygelDatabaseDatabase * rygel_database_database_new (const gchar *name
,RygelDatabaseFlavor flavor
,RygelDatabaseFlags flags
,GError **error
);
Connect to a SQLite database file
name |
. Name of the database which is used to create the file-name . |
[in] |
flavor |
. Specifies the flavor of the database . |
[in] |
flags |
. How to open the database . |
[in] |
error |
location to store the error occurring, or |
[error-domains RygelDatabaseDatabaseError] |
void rygel_database_database_set_name (RygelDatabaseDatabase *self
,const gchar *value
);
Set the value of the "name" property to value
.
self |
the RygelDatabaseDatabase instance to modify |
|
value |
the new value of the "name" property |
void rygel_database_database_set_flavor (RygelDatabaseDatabase *self
,RygelDatabaseFlavor value
);
Set the value of the "flavor" property to value
.
self |
the RygelDatabaseDatabase instance to modify |
|
value |
the new value of the "flavor" property |
void rygel_database_database_set_flags (RygelDatabaseDatabase *self
,RygelDatabaseFlags value
);
Set the value of the "flags" property to value
.
self |
the RygelDatabaseDatabase instance to modify |
|
value |
the new value of the "flags" property |
void rygel_database_database_utf8_contains (sqlite3_context *context
,sqlite3_value **args
,gint args_length1
);
Function to implement the custom SQL function 'contains'
gint rygel_database_database_utf8_collate (gint alen
,void *a
,gint blen
,void *b
);
Function to implement the custom SQLite collation 'CASEFOLD'.
Uses utf8 case-fold to compare the strings.
void
rygel_database_null (GValue *result
);
Special GValue to pass to exec or exec_cursor to bind a column to NULL
#define RYGEL_DATABASE_TYPE_DATABASE (rygel_database_database_get_type ())
The type for RygelDatabaseDatabase.
struct RygelDatabaseDatabase;
This class is a thin wrapper around SQLite's database object.
It adds statement preparation based on GValue and a cancellable exec function.
struct RygelDatabaseDatabaseClass { GObjectClass parent_class; };
The class structure for RYGEL_DATABASE_TYPE_DATABASE
. All the fields in this structure are private and should never be accessed directly.
“flags”
property“flags” RygelDatabaseFlags
flags.
Owner: RygelDatabaseDatabase
Flags: Write / Construct
Default value: RYGEL_DATABASE_FLAGS_READ_WRITE
“flavor”
property“flavor” RygelDatabaseFlavor
flavor.
Owner: RygelDatabaseDatabase
Flags: Write / Construct
Default value: RYGEL_DATABASE_FLAVOR_CACHE