Hi Max,
xq-promise has p:fork-join which seems to be the previous implementation Could I swap one for the other?
Right! A side note: I have slightly extended our documentation, because I guess it was not clearly to everyone what’s the difference between parallel and asynchronous execution [1].
let $ids := async:eval("declare variable $f external; declare variable $name external; $f($name)", map { 'f': '_:get-meta', 'name' : $name }) return $ids
With get-meta being a local function that accepts a single parameter. Is there an easier way to do this?
Hm. If you have a single argument, you could bind it to the context item:
async:eval(".", map { '': $var })
If you have several variables, it may be better to write an extra function, which prefixes your query with additional variable declarations (see e.g. here: [2]).
Best, Christian
[1] http://docs.basex.org/wiki/Async_Module [2] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/webapp/dba/m...
Regards,
Max