|  |  |  | Tracker SPARQL Library Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#include <tracker-sparql.h> gchar * tracker_sparql_get_uuid_urn (void); gchar * tracker_sparql_escape_string (const gchar *literal); gchar * tracker_sparql_escape_uri_printf (const gchar *format,...); gchar * tracker_sparql_escape_uri_vprintf (const gchar *format,va_list args);
gchar *             tracker_sparql_get_uuid_urn         (void);
Generates a unique universal identifier to be used for urns when inserting SPARQL into the database. The string returned is in lower case and has the format "urn:uuid:%s" where %s is the uuid generated.
| Returns : | a newly-allocated string. The returned string should
be freed with g_free()when no longer needed. | 
Since 0.10
gchar *             tracker_sparql_escape_string        (const gchar *literal);
Escapes a string so that it can be used in a SPARQL query.
| 
 | a string to escape | 
| Returns : | a newly-allocated string with the escaped version of literal.
The returned string should be freed withg_free()when no longer needed. | 
Since 0.10
gchar * tracker_sparql_escape_uri_printf (const gchar *format,...);
Calls tracker_sparql_escape_uri_vprintf() with the @... supplied.
| 
 | a standard printf()format string, but notice
string precision pitfalls documented ing_strdup_printf() | 
| 
 | the parameters to insert into the format string | 
| Returns : | a newly-allocated string holding the result.The returned string
should be freed with g_free()when no longer needed. | 
Since 0.10
gchar * tracker_sparql_escape_uri_vprintf (const gchar *format,va_list args);
Similar to the standard C vsprintf() function but safer, since it
calculates the maximum space required and allocates memory to hold
the result.
The result is escaped using g_uri_escape_string().
| 
 | a standard printf()format string, but notice
string precision pitfalls documented ing_strdup_printf() | 
| 
 | the list of parameters to insert into the format string | 
| Returns : | a newly-allocated string holding the result. The returned string
should be freed with g_free()when no longer needed. | 
Since 0.10