XMMS2
|
A set of results. More...
Functions | |
void | s4_resultset_add_row (s4_resultset_t *set, const s4_resultrow_t *row) |
Adds a row to a resultset. More... | |
int | s4_resultset_get_row (const s4_resultset_t *set, int row_no, const s4_resultrow_t **row) |
Gets a row from a resultset. More... | |
const s4_result_t * | s4_resultset_get_result (const s4_resultset_t *set, int row, int col) |
Gets a result from a resultset. More... | |
int | s4_resultset_get_colcount (const s4_resultset_t *set) |
Gets the column count for a resultset. More... | |
int | s4_resultset_get_rowcount (const s4_resultset_t *set) |
Gets the row count for a resultset. More... | |
void | s4_resultset_sort (s4_resultset_t *set, s4_order_t *order) |
Sorts a resultset. More... | |
void | s4_resultset_shuffle (s4_resultset_t *set) |
Shuffles the resultset into a pseudo-random order. More... | |
void | s4_resultset_free (s4_resultset_t *set) |
Frees a resultset and all the results in it. More... | |
s4_resultset_t * | s4_resultset_ref (s4_resultset_t *set) |
void | s4_resultset_unref (s4_resultset_t *set) |
s4_resultrow_t * | s4_resultrow_create (int col_count) |
Creates a new row. More... | |
void | s4_resultrow_set_col (s4_resultrow_t *row, int col_no, s4_result_t *col) |
Sets a column in a resultrow. More... | |
int | s4_resultrow_get_col (const s4_resultrow_t *row, int col_no, const s4_result_t **col) |
Gets the value of a column in a resultrow. More... | |
s4_resultrow_t * | s4_resultrow_ref (s4_resultrow_t *row) |
References a resultrow. More... | |
void | s4_resultrow_unref (s4_resultrow_t *row) |
Unreferences a resultrow. More... | |
s4_order_t * | s4_order_create (void) |
s4_order_entry_t * | s4_order_add_column (s4_order_t *order, s4_cmp_mode_t collation, s4_order_direction_t direction) |
s4_order_entry_t * | s4_order_add_random (s4_order_t *order, int seed) |
void | s4_order_entry_add_choice (s4_order_entry_t *entry, int column) |
void | s4_order_free (s4_order_t *order) |
s4_resultset_t * | s4_resultset_create (int col_count) |
Creates a new resultset. More... | |
A set of results.
s4_order_entry_t* s4_order_add_column | ( | s4_order_t * | order, |
s4_cmp_mode_t | collation, | ||
s4_order_direction_t | direction | ||
) |
s4_order_entry_t* s4_order_add_random | ( | s4_order_t * | order, |
int | seed | ||
) |
s4_order_t* s4_order_create | ( | void | ) |
void s4_order_entry_add_choice | ( | s4_order_entry_t * | entry, |
int | column | ||
) |
void s4_order_free | ( | s4_order_t * | order | ) |
s4_resultrow_t* s4_resultrow_create | ( | int | col_count | ) |
Creates a new row.
col_count | The number of columns in the row |
int s4_resultrow_get_col | ( | const s4_resultrow_t * | row, |
int | col_no, | ||
const s4_result_t ** | col | ||
) |
Gets the value of a column in a resultrow.
row | The row to get the column from |
col_no | The index of the column to get |
col | A pointer to where the column will be saved |
s4_resultrow_t* s4_resultrow_ref | ( | s4_resultrow_t * | row | ) |
void s4_resultrow_set_col | ( | s4_resultrow_t * | row, |
int | col_no, | ||
s4_result_t * | col | ||
) |
Sets a column in a resultrow.
row | The row to set the column in |
col_no | The index of the column to set |
col | The new value of the column |
void s4_resultrow_unref | ( | s4_resultrow_t * | row | ) |
Unreferences a resultrow.
If the refcount hits 0 the row will be freed
row | The row to unrefperence |
Referenced by s4_resultset_create().
void s4_resultset_add_row | ( | s4_resultset_t * | set, |
const s4_resultrow_t * | row | ||
) |
Adds a row to a resultset.
set | The resultset to add to |
row | The row to add |
Referenced by _s4_query().
s4_resultset_t* s4_resultset_create | ( | int | col_count | ) |
Creates a new resultset.
col_count | The number of columns in every result |
Referenced by _s4_query(), and s4_query().
void s4_resultset_free | ( | s4_resultset_t * | set | ) |
Frees a resultset and all the results in it.
set | The set to free |
Referenced by CASE(), s4_resultset_unref(), xmms_medialib_entry_cleanup(), xmms_medialib_entry_not_resolved_get(), xmms_medialib_entry_remove(), xmms_medialib_num_not_resolved(), xmms_medialib_query(), xmms_medialib_query_to_xmmsv(), and xmms_medialib_session_property_set().
int s4_resultset_get_colcount | ( | const s4_resultset_t * | set | ) |
Gets the column count for a resultset.
set | The set to find the column count of |
Referenced by CASE(), find_column(), and print_result().
const s4_result_t* s4_resultset_get_result | ( | const s4_resultset_t * | set, |
int | row, | ||
int | col | ||
) |
Gets a result from a resultset.
set | The set to get the result from |
row | The row |
col | The column |
Referenced by CASE(), print_result(), xmms_medialib_entry_cleanup(), xmms_medialib_entry_not_resolved_get(), xmms_medialib_entry_remove(), and xmms_medialib_session_property_set().
int s4_resultset_get_row | ( | const s4_resultset_t * | set, |
int | row_no, | ||
const s4_resultrow_t ** | row | ||
) |
Gets a row from a resultset.
set | The resultset to get the row from |
row_no | The index of the row to fetch |
row | A pointer to where the row will be saved |
int s4_resultset_get_rowcount | ( | const s4_resultset_t * | set | ) |
Gets the row count for a resultset.
set | The set to find the row count of |
Referenced by CASE(), print_result(), xmms_medialib_entry_cleanup(), xmms_medialib_entry_remove(), xmms_medialib_num_not_resolved(), and xmms_medialib_query_to_xmmsv().
s4_resultset_t* s4_resultset_ref | ( | s4_resultset_t * | set | ) |
void s4_resultset_shuffle | ( | s4_resultset_t * | set | ) |
Shuffles the resultset into a pseudo-random order.
set | The resultset to shuffle |
void s4_resultset_sort | ( | s4_resultset_t * | set, |
s4_order_t * | order | ||
) |
Sorts a resultset.
set | The set to sort |
order | The columns to order the result by |
void s4_resultset_unref | ( | s4_resultset_t * | set | ) |