Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created December 5, 2015 16:11
Show Gist options
  • Select an option

  • Save ableasdale/994e2b11cb30f6e4b180 to your computer and use it in GitHub Desktop.

Select an option

Save ableasdale/994e2b11cb30f6e4b180 to your computer and use it in GitHub Desktop.
Simplistic test data XQuery stub
xquery version "1.0-ml";
for $x in (1 to 20)
return
xdmp:spawn-function(function()
{
for $i at $pos in 1 to 50000
return xdmp:document-insert(
fn:concat("/", xdmp:random(), ".xml"),
element test-data {
element id {$pos},
element data {xdmp:random()}
}
)
},
<options xmlns="xdmp:eval">
<transaction-mode>update-auto-commit</transaction-mode>
</options>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment