Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp:spawn-in

xdmp:spawn-in(
   $path as xs:string,
   $ID as xs:unsignedLong,
   [$vars as item()*],
   [$modules as xs:unsignedLong?],
   [$root as xs:string?]
) as empty-sequence()

Summary

[DEPRECATED: use xdmp:spawn with the database option instead] Place the specified module on the task queue for evaluation. It will be evaluated in the given database.

Parameters
path The path, relative to the specified root, of the module to be executed.
ID The database ID, from xdmp:database("db_name"), xdmp:security-database(), or xdmp:schema-database().
vars The external variable values for this evaluation. This must be a sequence of even length, alternating QNames and items. Each QName and item pair specify a variable name and value.
modules The modules database that contains the module to invoke. The empty sequence specifies the current modules database.
root The root path for modules. The empty sequence specifies the current root.

Usage Notes

The xdmp:spawn-in function places the specified XQuery module in the task queue to be processed. The module will be evaluated when the task server has the available resources to process it. The tasks are processed in the order in which they are added to the queue.

Example

  xdmp:spawn-in("example.xqy",
                324398742983742,
                (),
                xdmp:modules-database(),
                "http://example.com/application/")
  => ()
  Puts the module from the modules database with the
  URI http://example.com/application/module.xqy
  in the task server queue. The module will be
  executed in the context of the database with
  an ID of 324398742983742.

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