我知道如何在xml文件中插入文档,但不知道如何将xquery文件存储到Marklogic Module数据库中。我要存储xquery文件以设置计划任务的原因。我在下面有一个xquery文件。提前致谢。
declare namespace...
let $uris := cts:element-value(...code...),
cts:and-query((...code...))
let $result := {<stats><top-docs>
for $uri in $uris[1 to 10]
...more code here..
}</top-docs></stats>
let $permissions := (xdmp:permission(..give permissions here.))
let $_ := xdmp:log("Inserting Stats Document")
return xdmp:document-insert("/acitivity/stats.xml",$result, $permissions))
有很多方法可以将xqy文件插入modules数据库。这里仅仅是少数:
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句