Value binding inside SERVICE queries
I want to run a query like this:
SELECT ?url EXISTS { ?urn nautilus:starred true } AS ?starred
{
?urn a rdfs:Resource .
SERVICE <dbus:org.freedesktop.Tracker3.Miner.Files> {
?urn nie:isStoredAs ?url .
FILTER (tracker:id(?urn) = ~id)
}
}
I am preparing the query and the binding the 'id' value before running it:
self->query_updated_file_url = tracker_sparql_connection_query_statement (self->local,
QUERY_UPDATED_FILE_URL,
cancellable,
error);
...
tracker_sparql_statement_bind_int (self->query_updated_file_url, "id", tracker_notifier_event_get_id (event));
I get this error when I run the query:
Tracker-WARNING **: 18:52:52.064: Could not create remote cursor: GDBus.Error:org.freedesktop.Tracker.Error.Type: Parameter 'id' has no given value
It seems that the service_filter()
function is receives the inner query string with the parameter unbound.