Loading TOC...

MarkLogic 12 Product Documentation
cts:query-params

cts:query-params(
   $query as cts:query
) as json:object*

Summary

Output a sequence of JSON objects with parameters used in the query. This function also returns the type of a parameter.

Parameters
query Input query from which to extract the parameter names and types.

Example

xquery version "1.0-ml";
let $query-template:=cts:word-query(cts:param("wordParam")) 
return cts:query-params($query-template)

=> {
"parameter": "wordParam", 
"type": "String*"
}

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