
MarkLogic 12 Product Documentation
cts.bindQueryParamscts.bindQueryParams(
query as cts.query,
params as Object
) as cts.query
Summary
Replace parameters in a query with actual values.
| Parameters |
| query |
Input query of which to replace the parameters.
|
| params |
A map of parameter name to value bindings, where each key is the name
passed to cts:param() and the corresponding value replaces
that parameter in the query.
|
Example
const queryTemplate=cts.wordQuery(cts.param("wordParam"))
cts.bindQueryParams(queryTemplate,{"wordParam":"cat"})
=> cts:word-query("cat", ("lang=en"), 1)
Copyright © 2026 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.