sem.rdfInsert( triples as sem.triple | Sequence | Array, [options as String[]], [permissions as Object[]], [collections as String[]], [quality as xs.int?], [forest-ids as (Number|String)[]] ) as Sequence
This function inserts triples into a specified database as
one or more sem:triples
documents. It also
creates graph metadata for the graph specified by the
"graph" or "override-graph=URI" option.
This is an update function that returns the document URIs of
inserted documents.
sem:rdf-insert
in the
context of SPARQL Update can result in undefined behavior.
declareUpdate(); const sem = require("/MarkLogic/semantics.xqy"); sem.rdfInsert( sem.triple( sem.iri("http://example.com/ns/directory#m"), sem.iri("http://example.com/ns/person#firstName"), "Michael")); => /triplestore/74521a908ece2074.xml