Loading TOC...


op:call() as map:map


This function to calls a built-in function on every row.

The call() function is needed only for built-in functions that aren't already supported by the Optic expression functions that appear in the Value Processing Functions list.

Use the call() function with care and only for functions that transform values without side effects. Some builtins could adversely affect performance, create deadlocks through the need for update transactions, or worse. The following restrictions apply to the op.call() function:


xquery version "1.0-ml";

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

op:from-view("main", "employees")
	   => op:select(("EmployeeID",
                              json:to-array((op:col("EmployeeID"), "_x"))
	   => op:result()

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