librdf_query_results_get_bindings

Name

librdf_query_results_get_bindings --  Get all binding names, values for current result

Synopsis

int librdf_query_results_get_bindings (librdf_query_results * query_results, const char *** names, librdf_node ** values);

Arguments

query_results

librdf_query_results query results

names

pointer to an array of binding names (or NULL)

values

pointer to an array of binding value librdf_node (or NULL)

Description

If names is not NULL, it is set to the address of a shared array of names of the bindings (an output parameter). These names are shared and must not be freed by the caller

If values is not NULL, it is used as an array to store pointers to the librdf_node* of the results. These nodes must be freed by the caller. The size of the array is determined by the number of names of bindings, returned by librdf_query_get_bindings_count dynamically or will be known in advanced if hard-coded into the query string.

Example

const char **names=NULL; librdf_node* values[10];

if(librdf_query_results_get_bindings(results, names, values)) ...

Return value

non-0 if the assignment failed