XMMS2
Functions
Entry

Functions

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 new relation to a database.
 
int _s4_add_internal (s4_t *s4, const char *key_a, const s4_val_t *value_a, const char *key_b, const s4_val_t *value_b, const char *src)
 
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 relation from a database.
 
s4_resultset_t_s4_query (s4_transaction_t *trans, s4_fetchspec_t *fs, s4_condition_t *cond)
 Queries a database for all entries matching a condition, then fetches data from them.
 
s4_entry_data_t_entry_create_data ()
 
void _entry_free_data (s4_entry_data_t *data)
 
void _free_relations (s4_t *s4)
 Frees all relations in a database.
 

Detailed Description

The in-memory database.

Function Documentation

◆ _entry_create_data()

s4_entry_data_t * _entry_create_data ( void )

Referenced by _reread_file().

◆ _entry_free_data()

void _entry_free_data ( s4_entry_data_t * data)

Referenced by _reread_file().

◆ _free_relations()

void _free_relations ( s4_t * s4)

Frees all relations in a database.

Parameters
s4The database to free in

Referenced by _reread_file().

◆ _s4_add()

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 new relation to a database.

Parameters
s4The database to add to
key_aThe key of the first entry
val_aThe value of the first entry
key_bThe key of the second entry
val_bThe value of the second entry
srcThe source that made the relation
Returns
non-zero if everything went alrite, 0 otherwise

Referenced by _oplist_execute(), _oplist_rollback(), and s4_add().

◆ _s4_add_internal()

int _s4_add_internal ( s4_t * s4,
const char * key_a,
const s4_val_t * value_a,
const char * key_b,
const s4_val_t * value_b,
const char * src )

◆ _s4_del()

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 relation from a database.

Parameters
s4The database to delete from
key_aThe key of the first entry
val_aThe value of the first entry
key_bThe key of the second entry
val_bThe value of the second entry
srcThe source that made the relation
Returns
non-zero if everything went alrite, 0 otherwise

Referenced by _oplist_execute(), _oplist_rollback(), and s4_del().

◆ _s4_query()

s4_resultset_t * _s4_query ( s4_transaction_t * trans,
s4_fetchspec_t * fs,
s4_condition_t * cond )

Queries a database for all entries matching a condition, then fetches data from them.

Parameters
transThe transaction this query belongs to.
fsThe fetchspec to use when fetching data
condThe condition to check entries against
Returns
A resultset with a row for every entry that matched

Referenced by s4_query().