This module provides runtime support for running compiled queries. I.e. it defines special constructs that may be emitted by the compiler and optmizer that are common to all query languages. Language specific runtime support is in serql_runtime.pl and sparql_runtime.pl
- rdfql_carthesian(:Bags) is nondet
- Bags is a list of independent goals. This predicate provides the
variable bindings for the carthesian product of all solutions of
each goal in Bags. For example:
?- rdfql_carthesian([ bag([X], between(1,2,X)), bag([Y], between(1,2,Y))]). X = 1, Y = 1 ; X = 1, Y = 2 ; X = 2, Y = 1 ; X = 2, Y = 2 ; false.
- rdfql_cond_bind_null(+List) is det
- Bind variables in List to our NULL-representation, which is
- rdfql_bind_null(+List) is semidet
- True if all elements in List unify with
- rdfql_triple_in(-Triple, +Triples) is nondet
- True when Triple is an
rdf(S,P,O)element in Triples that does not contain NULL. Used for CONSTRUCT and DESCRIBE.
The following predicates are re-exported from other modules
- sparql_find(?From, ?To, ?F, ?T, :Q) is nondet
- Implement *(PropertyPath). We should probably collect translated
queries in a dynamic predicate to avoid the copy_term. Also, Q
will quite often be simple. In that case we can map to
rdf_reachable/3, although one of the problems is that
rdf_reachable/3 uses rdf_has/3, and does not deal with graphs.
We should be a bit smarter here and choose between forward, backward, two-sided breath-first, etc. based on which start point is given.
- sparql_service(+Silent, +URL, +Prefixes, +Bindings, +QText)
- Execute a remote SPARQL SERVICE request
- sparql_minus(:QLeft, :QRight)
- Realise SPARQL
MINUS. This is defined to
- Take the variables of QLeft
- Determine the result-set for these variables for both QLeft and QRight
- Substract those from QLeft that are in QRight
- Generated from FILTER Term, where Term must be converted to a boolean as 'Effective Boolean Value'.
- sparql_subquery(+Proj, :Query, +Solutions) is nondet
- Execute a SPARQL subquery.
- sparql_update(:Updates) is det
- Handle SPARQL update requests.
- sparql_eval(+Expr, -Results)
- Evaluate a SPARQL expression.
- sparql_group(:Goal, +OuterVars, +InnerVars)
- Execute a group that contains non-steadfast variables, which asks for delayed unification of the output arguments.
- Same as call. Intended to keep groups together to avoid invalid optimizations.
- serql_member_statement(-Triple, +List)
- Get the individual triples from the original reply. Used for CONSTRUCT queries. As handling optional matches is different int SeRQL compared to SPARQL, the selection is in the SeRQL runtime module.
- serql_compare(+Op, +Left, +Right)
- Handle numerical and textual comparison of literals. Some work must be done at compiletime.
The following predicates are exported, but not or incorrectly documented.