Loading TOC...

MarkLogic 12 EA 2 Product Documentation
sem.sparqlPlan

sem.sparqlPlan(
   sparql as String,
   [bindingNames as String[]],
   [options as String[]]
) as ObjectNode

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.sparqlPlan("select * { ?s ?p ?o }",null,"optimize=1")

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