Loading TOC...


   $uri as xs:string,
   $root as node(),
   [$insert-options as (element()|map:map)?],
   [$options as xs:string*]
) as element(sec:query-rolesets)*


Return a sequence of query-rolesets that are required for proper querying with Element Level Security if the node is inserted into the database with the given document-insert options. A typical workflow calls this function and adds each query-rolesets through the sec:add-query-rolesets function before inserting the document into the database so that the document can be correctly queried with Element Level Security as soon as it is inserted.

$uri The URI to be used when the document is inserted later.
$root The root node. The root node can be an element node, an object node or an array node.
$insert-options Options from the xdmp:document-insert function. You can pass either an XML element node or a map:map.
$options Other options. The default is ().

Options include:

Return all query-rolesets, even if they are already configured.
Return only those query-rolesets that are not configured.

Required Privileges


Usage Notes

If neither "all" nor "unconfigured" is present, it defaults to "unconfigured".


    "/example.xml", <foo>aaa</foo>, (), ("all"))


    <options xmlns="xdmp:document-insert">

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