Rdf.SparqlSourceSparql queries.
type error = | Parse_error of Loc.loc * string| Value_error of Dt.error| Eval_error of Sparql_eval.error| Algebra_error of Sparql_algebra.error| Not_select| Not_ask| Not_construct| Not_describe| Not_get| Not_update| Not_implemented of stringget_term solution varname returns the Term.term bound to varname in the solution.
is_bound solution varname returns whether the given variable name is bound in the solution.
solution_fold f sol acc is f var1 term1 (f var2 term2 (...) acc), folding over the bindings of the solution.
solution_iter f solution calls f on each pair (varname, term) of the solution.
All these functions can raise Dt.Error exceptions in case the term bounded to the variable name is not compatible with the asked type.
The functions are just calls to Dt functions. For example, get_int retrieve the bounded term with get_term, then calls Dt.of_term to get a Dt.value, than calls Dt.int to retrieve an Int n value, then return n.
Same as get_string but the associated language tag is kep, if any.
execute ~base dataset q executes the sparql query q on dataset, using base as base iri. The form of the result depends on the kind of query:
Solution solutionsBool boolGraph g.For Construct and Describe queries, if a graph is provided, it is filled and the same graph is returned; else a new graph (in memory) is created, filled and returned. If the graph is created, it iri is the base iri provided.
Warning: Describe queries are not implemented yet.
Execute the given SELECT query.
Execute the given CONSTRUCT query.
Execute the given ASK query.
Execute the given DESCRIBE query.
These are the functions named by an IRI, see details here.
A function takes a list of values and returns a value.