XMMS2
|
Functions dealing with transactions. More...
Functions dealing with transactions.
void _transaction_add_lock | ( | s4_transaction_t * | trans, |
s4_lock_t * | lock | ||
) |
Referenced by _lock_exclusive(), and _lock_shared().
s4_transaction_t* _transaction_dummy_alloc | ( | s4_t * | s4 | ) |
void _transaction_dummy_free | ( | s4_transaction_t * | trans | ) |
s4_t* _transaction_get_db | ( | s4_transaction_t * | trans | ) |
Referenced by _oplist_get_db(), _s4_add(), _s4_del(), _s4_query(), s4_add(), s4_commit(), and s4_del().
int _transaction_get_flags | ( | s4_transaction_t * | trans | ) |
Referenced by _lock_shared().
GList* _transaction_get_locks | ( | s4_transaction_t * | trans | ) |
Referenced by _lock_unlock_all().
s4_lock_t* _transaction_get_waiting_for | ( | s4_transaction_t * | trans | ) |
void _transaction_set_deadlocked | ( | s4_transaction_t * | trans | ) |
Referenced by _s4_add(), _s4_del(), and _s4_query().
void _transaction_set_waiting_for | ( | s4_transaction_t * | trans, |
s4_lock_t * | waiting_for | ||
) |
Referenced by _lock_exclusive(), and _lock_shared().
void _transaction_writing | ( | s4_transaction_t * | trans | ) |
int s4_abort | ( | s4_transaction_t * | trans | ) |
Aborts a transaction.
The database will behave like the transaction never happened.
trans | The transaction |
Referenced by CASE(), and xmms_medialib_session_abort().
int s4_add | ( | s4_transaction_t * | trans, |
const char * | key_a, | ||
const s4_val_t * | val_a, | ||
const char * | key_b, | ||
const s4_val_t * | val_b, | ||
const char * | src | ||
) |
Adds a relationship to the database.
It takes both a database handle and a transaction handle, but only one if used. If the transaction handle is NULL it will create a local transaction, otherwise it will use the transaction passed, and thus s4 is not needed.
s4 | The database to add to. |
trans | The transaction to use. |
key_a | Key A. |
val_a | Value A. |
key_b | Key B. |
val_b | Value B. |
src | Source. |
Referenced by CASE(), main(), and xmms_medialib_session_property_set().
s4_transaction_t* s4_begin | ( | s4_t * | s4, |
int | flags | ||
) |
int s4_commit | ( | s4_transaction_t * | trans | ) |
Commits a transaction.
On success the operations in the transactions will be applied in one atomic step, on error none of the operations in the transaction will be applied.
trans | The transaction to commit. |
Referenced by CASE(), main(), and xmms_medialib_session_commit().
int s4_del | ( | s4_transaction_t * | trans, |
const char * | key_a, | ||
const s4_val_t * | val_a, | ||
const char * | key_b, | ||
const s4_val_t * | val_b, | ||
const char * | src | ||
) |
Deletes a relationship from the database.
It takes both a database handle and a transaction handle, but only one if used. If the transaction handle is NULL it will create a local transaction, otherwise it will use the transaction passed, and thus s4 is not needed.
s4 | The database to delete from. |
trans | The transaction to use. |
key_a | Key A. |
val_a | Value A. |
key_b | Key B. |
val_b | Value B. |
src | Source. |
Referenced by CASE(), main(), xmms_medialib_session_property_set(), and xmms_medialib_session_property_unset().
s4_resultset_t* s4_query | ( | s4_transaction_t * | trans, |
s4_fetchspec_t * | spec, | ||
s4_condition_t * | cond | ||
) |
Queries an S4 database.
s4 | The database to query. If s4 is NULL trans must be non-null. |
trans | The transaction to use. If trans is NULL s4 must be non-null. |
spec | The fetchspecification to use when querying. |
cond | The condition to use when querying. |
Referenced by CASE(), xmms_medialib_session_property_set(), and xmms_medialib_session_query().