op.docColTypes() as rowColTypes
Provides the 3rd parameter for op.fromParam for row column types.
declareUpdate(); const op = require('/MarkLogic/optic'); const rows =[ {uri:'/optic/update/execute3.json', doc:{"doc":"execute3"}, collections:['execute', 'write'], quality:3, permissions:[xdmp.permission("rest-reader","read"),xdmp.permission("rest-writer","update")]}, {uri:'/optic/update/execute4.json', doc:{"doc":"execute4"}, collections:['execute', 'write'], quality:4, permissions:[xdmp.permission("rest-reader","read"),xdmp.permission("rest-writer","update")]} ]; op.fromParam('bindingParam', null, op.docColTypes()) .bind(op.as('metadata', op.jsonObject([op.prop('time', op.jsonString('2022-10-13T11:00:0'))]))) .write() .execute({bindingParam:rows}, "trace=QueryFromParam");
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.