|
s4_val_t * | s4_val_new_string (const char *str) |
| Creates a new string value. More...
|
|
s4_val_t * | s4_val_new_int (int32_t i) |
| Creates a new integer value. More...
|
|
s4_val_t * | s4_val_copy (const s4_val_t *val) |
| Copies a value. More...
|
|
void | s4_val_free (s4_val_t *val) |
| Frees a value. More...
|
|
int | s4_val_is_str (const s4_val_t *val) |
| Checks is a value is a string value. More...
|
|
int | s4_val_is_int (const s4_val_t *val) |
| Checks is a value is an integer value. More...
|
|
int | s4_val_get_str (const s4_val_t *val, const char **str) |
| Tries to get the string in a string value. More...
|
|
int | s4_val_get_int (const s4_val_t *val, int32_t *i) |
| Tries to get the integer in an integer value. More...
|
|
int | s4_val_get_collated_str (const s4_val_t *val, const char **str) |
| Tries to get the normalized string in a string value. More...
|
|
int | s4_val_get_casefolded_str (const s4_val_t *val, const char **str) |
| Tries to get the normalized string in a string value. More...
|
|
int | s4_val_cmp (const s4_val_t *v1, const s4_val_t *v2, s4_cmp_mode_t mode) |
| Compares two values. More...
|
|
s4_t * | s4_open (const char *name, const char **indices, int flags) |
| Opens an S4 database. More...
|
|
int | s4_close (s4_t *s4) |
| Closes an open S4 database. More...
|
|
void | s4_sync (s4_t *s4) |
| Writes all changes to disk. More...
|
|
s4_errno_t | s4_errno (void) |
| Returns the last error number set. More...
|
|
void | s4_create_uuid (unsigned char uuid[16]) |
| Creates a new random UUID and saves it in the array passed. More...
|
|
void | s4_get_uuid (s4_t *s4, unsigned char uuid[16]) |
| Gets the UUID of a S4 database. More...
|
|
char * | s4_get_uuid_string (s4_t *s4) |
| Gets the UUID-string of a S4 database. More...
|
|
s4_sourcepref_t * | s4_sourcepref_create (const char **sourcepref) |
| Creates a new source preferences that can be used when querying. More...
|
|
void | s4_sourcepref_unref (s4_sourcepref_t *sourcepref) |
| Decreases the reference of a sourcepref. More...
|
|
s4_sourcepref_t * | s4_sourcepref_ref (s4_sourcepref_t *sp) |
| Increases the refcount of a sourcepref. More...
|
|
int | s4_sourcepref_get_priority (s4_sourcepref_t *sp, const char *src) |
| Gets the priority of a source. More...
|
|
s4_condition_t * | s4_cond_new_combiner (s4_combine_type_t type) |
| Creates a new combiner. More...
|
|
s4_condition_t * | s4_cond_new_custom_combiner (combine_function_t func) |
| Creates a new combiner with a user specified combiner function. More...
|
|
void | s4_cond_add_operand (s4_condition_t *cond, s4_condition_t *op) |
| Adds and references an operand to a combiner condition. More...
|
|
s4_condition_t * | s4_cond_get_operand (s4_condition_t *cond, int op) |
| Gets an operand from a combiner condition. More...
|
|
s4_condition_t * | s4_cond_new_filter (s4_filter_type_t type, const char *key, const s4_val_t *value, s4_sourcepref_t *sourcepref, s4_cmp_mode_t mode, int flags) |
| Creates a new filter condition. More...
|
|
s4_condition_t * | s4_cond_new_custom_filter (filter_function_t func, void *userdata, free_func_t free, const char *key, s4_sourcepref_t *sourcepref, s4_cmp_mode_t cmp_mode, int monotonic, int flags) |
| Creates a new filter condition with a user specified filter function. More...
|
|
int | s4_cond_is_filter (s4_condition_t *cond) |
| Checks if this condition is a filter condition. More...
|
|
int | s4_cond_is_combiner (s4_condition_t *cond) |
| Checks if this condition is a combiner condition. More...
|
|
s4_filter_type_t | s4_cond_get_filter_type (s4_condition_t *cond) |
|
s4_combine_type_t | s4_cond_get_combiner_type (s4_condition_t *cond) |
|
int | s4_cond_get_flags (s4_condition_t *cond) |
| Gets the flags for a condition. More...
|
|
const char * | s4_cond_get_key (s4_condition_t *cond) |
| Gets the key for a condition. More...
|
|
s4_sourcepref_t * | s4_cond_get_sourcepref (s4_condition_t *cond) |
| Gets the source preference that should be used. More...
|
|
int | s4_cond_is_monotonic (s4_condition_t *cond) |
| Checks if the condition is a monotonic filter. More...
|
|
void * | s4_cond_get_funcdata (s4_condition_t *cond) |
| Returns the data that should be fed to the filter function. More...
|
|
void | s4_cond_update_key (s4_condition_t *cond, s4_t *s4) |
| Change the key with a constant key for faster checking. More...
|
|
int | s4_cond_get_cmp_mode (s4_condition_t *cond) |
| Gets the comparison mode used by the filter condition. More...
|
|
void | s4_cond_free (s4_condition_t *cond) |
| Frees a condition and operands recursively. More...
|
|
s4_condition_t * | s4_cond_ref (s4_condition_t *cond) |
| Increments the reference count of a condition. More...
|
|
void | s4_cond_unref (s4_condition_t *cond) |
| Decrements the reference count of a condition. More...
|
|
filter_function_t | s4_cond_get_filter_function (s4_condition_t *cond) |
| Gets the filter function for the condition. More...
|
|
combine_function_t | s4_cond_get_combine_function (s4_condition_t *cond) |
| Gets the combine function for the condition. More...
|
|
s4_fetchspec_t * | s4_fetchspec_create (void) |
| Creates a new fetch specification. More...
|
|
void | s4_fetchspec_add (s4_fetchspec_t *spec, const char *key, s4_sourcepref_t *sourcepref, int flags) |
| Adds something to fetch to the fetch specification. More...
|
|
void | s4_fetchspec_free (s4_fetchspec_t *spec) |
| Frees a fetchspec. More...
|
|
s4_fetchspec_t * | s4_fetchspec_ref (s4_fetchspec_t *spec) |
|
void | s4_fetchspec_unref (s4_fetchspec_t *spec) |
|
int | s4_fetchspec_size (s4_fetchspec_t *spec) |
| Gets the size of the fetchspec. More...
|
|
const char * | s4_fetchspec_get_key (s4_fetchspec_t *spec, int index) |
| Gets the key at a give index. More...
|
|
s4_sourcepref_t * | s4_fetchspec_get_sourcepref (s4_fetchspec_t *spec, int index) |
| Gets the sourcepref at a give index. More...
|
|
int | s4_fetchspec_get_flags (s4_fetchspec_t *spec, int index) |
|
void | s4_fetchspec_update_key (s4_t *s4, s4_fetchspec_t *spec) |
|
const s4_result_t * | s4_result_next (const s4_result_t *res) |
| Gets the next result. More...
|
|
const char * | s4_result_get_key (const s4_result_t *res) |
| Gets the result key. More...
|
|
const char * | s4_result_get_src (const s4_result_t *res) |
| Gets the result source. More...
|
|
const s4_val_t * | s4_result_get_val (const s4_result_t *res) |
| Gets the result value. 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_resultset_t * | s4_resultset_create (int col_count) |
| Creates a new resultset. More...
|
|
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_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) |
|
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...
|
|
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_pattern_t * | s4_pattern_create (const char *pattern, int normalize) |
| Creates a new pattern. More...
|
|
int | s4_pattern_match (const s4_pattern_t *p, const s4_val_t *val) |
| Matches a pattern against a value. More...
|
|
void | s4_pattern_free (s4_pattern_t *pattern) |
| Frees a pattern created with s4_pattern_create. More...
|
|
char * | s4_string_collate (const char *str) |
| Creates a string that orders correctly according to the locale. More...
|
|
char * | s4_string_casefold (const char *str) |
| Creates a casefolded version of the string. More...
|
|
s4_transaction_t * | s4_begin (s4_t *s4, int flags) |
| Starts a new transaction. More...
|
|
int | s4_commit (s4_transaction_t *trans) |
| Commits a transaction. More...
|
|
int | s4_abort (s4_transaction_t *trans) |
| Aborts a transaction. More...
|
|
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. More...
|
|
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. More...
|
|
s4_resultset_t * | s4_query (s4_transaction_t *trans, s4_fetchspec_t *fs, s4_condition_t *cond) |
| Queries an S4 database. More...
|
|