sem:in-memory-store( $dataset as sem:triple* ) as sem:store
Returns a sem:store
constructor that queries from the sequence
of sem:triple
values passed in as an argument. The
sem:store
constructor returned from this function will raise an
error if it is passed as part of the options argument to a call to
sem:sparql-update()
.
The default rulesets configured on the current database have no effect on a
sem:store
constructor created with sem:in-memory-store()
.
This should be used along with sem:sparql()
in preference to the
deprecated sem:sparql-triples()
function. We will remove documentation
of sem:sparql-triples()
, but leave the function for backwards
compatibility.
This function is a built-in.
http://marklogic.com/xdmp/privileges/sem-sparql
xquery version "1.0-ml"; import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; let $turtle-document := ' @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix ex: <http://example.org/people/1.0/> . <http://www.w3.org/TR/rdf-syntax-grammar> dc:title "RDF/XML Syntax Specification (Revised)" ; ex:editor [ ex:fullname "Dave Beckett"; ex:homePage <http://purl.org/net/dajobe/> ] .' let $triples := sem:rdf-parse($turtle-document, ("turtle", "repair") ) return sem:in-memory-store($triples) => sem:store() : Use the value to pass into a function that requires a sem:store (like sem:sparql-update).