Loading TOC...

MarkLogic 9 Product Documentation
op:param

op:param(
   $name as xs:string
) as map:map

Summary

This function creates a placeholder for a literal value in an expression or as the offset or max for a limit. The op:result function throws in an error if the binding parameter does not specify a literal value for the parameter.

Parameters
$name The name of the parameter.

Example


xquery version "1.0-ml";

import module namespace op="http://marklogic.com/optic"
     at "/MarkLogic/optic.xqy";

let $employees := op:from-view("main", "employees")
 
return $employees
   => op:offset-limit(op:param('start'), op:param('length'))
   => op:select(('EmployeeID', 
                  op:as('incremented',
                  op:add(op:col('EmployeeID'),
                  op:param('increment')))))
   => op:result((), map:entry("start",1)
   => map:with("length",2)
   => map:with("increment",1))
  
  

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