IteratePlan.prototype.execute( [bindings as String], [options as String[]] ) as null
This method executes the plan. The result is ignored. This function can be used in an Optic Update.
declareUpdate(); const op = require('/MarkLogic/optic'); op.fromDocDescriptors([{uri:"/test.xml"}]) .remove() .execute(null, ['trace=myQuery', 'optimize=1']);
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.