Loading TOC...

MarkLogic 12 EA 1 Product Documentation
sem:sparql-plan

sem:sparql-plan(
   $sparql as xs:string,
   [$bindingNames as xs:string*],
   [$options as xs:string*]
) as element()

Summary

Return a node representing the query plan of the given SPARQL query.

Parameters
sparql The SPARQL query to be executed.
bindingNames A sequence of strings naming the variables whose values should be provided by the sem:sparql() call. These values will be substituted into the query where referenced as if they were literals.
options Options as a sequence of string values. Available options are:
"base=IRI"
The initial base IRI for the query.
"optimize=N"
Sets the optimization level to use. Levels of 0 (off), 1, and 2 are recognized. The default is 1.
"xml"
Outputs an XML format query plan. This is the default.
"json"
Outputs a JSON format query plan. The default is "xml".

Required Privileges

http://marklogic.com/xdmp/privileges/sem-sparql

Example


    sem:sparql-plan("select * { ?s ?p ?o }",(),"optimize=1")

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.