# Utility Functions

Collection of Tracker utility functions.

## Functions

### tracker_sparql_escape_string

    gchar *
    tracker_sparql_escape_string (const gchar * literal)

Escapes literal so it is suitable for insertion in SPARQL queries as string literals. Manual construction of query strings based user input is best avoided at all cost, use of TrackerSparqlStatement is recommended instead.

Parameters:

`literal` –

a string to escape

Returns ( [transfer: full]) –

the escaped string

### Tracker.prototype.sparql_escape_string

    function Tracker.prototype.sparql_escape_string(literal: String): {
        // javascript wrapper for 'tracker_sparql_escape_string'
    }

Escapes literal so it is suitable for insertion in SPARQL queries as string literals. Manual construction of query strings based user input is best avoided at all cost, use of Tracker.SparqlStatement is recommended instead.

Parameters:

`literal` (String) –

a string to escape

Returns (String) –

the escaped string

### Tracker.sparql_escape_string

    def Tracker.sparql_escape_string (literal):
        #python wrapper for 'tracker_sparql_escape_string'

Escapes literal so it is suitable for insertion in SPARQL queries as string literals. Manual construction of query strings based user input is best avoided at all cost, use of Tracker.SparqlStatement is recommended instead.

Parameters:

`literal` (str) –

a string to escape

Returns (str) –

the escaped string

### tracker_sparql_get_ontology_nepomuk

    GFile *
    tracker_sparql_get_ontology_nepomuk ()

Returns a path to the built-in Nepomuk ontologies.

Returns ( [transfer: full]) –

a GFile instance.

### Tracker.prototype.sparql_get_ontology_nepomuk

    function Tracker.prototype.sparql_get_ontology_nepomuk(): {
        // javascript wrapper for 'tracker_sparql_get_ontology_nepomuk'
    }

Returns a path to the built-in Nepomuk ontologies.

Returns (Gio.File) –

a Gio.File instance.

### Tracker.sparql_get_ontology_nepomuk

    def Tracker.sparql_get_ontology_nepomuk ():
        #python wrapper for 'tracker_sparql_get_ontology_nepomuk'

Returns a path to the built-in Nepomuk ontologies.

Returns (Gio.File) –

a Gio.File instance.

### tracker_sparql_get_uuid_urn

    gchar *
    tracker_sparql_get_uuid_urn ()

Creates a fresh UUID-based URN.

Returns ( [transfer: full]) –

A newly generated UUID URN.

### Tracker.prototype.sparql_get_uuid_urn

    function Tracker.prototype.sparql_get_uuid_urn(): {
        // javascript wrapper for 'tracker_sparql_get_uuid_urn'
    }

Creates a fresh UUID-based URN.

Returns (String) –

A newly generated UUID URN.

### Tracker.sparql_get_uuid_urn

    def Tracker.sparql_get_uuid_urn ():
        #python wrapper for 'tracker_sparql_get_uuid_urn'

Creates a fresh UUID-based URN.

Returns (str) –

A newly generated UUID URN.

The results of the search are