2 Jun
2020
2 Jun
'20
5:18 p.m.
Hm… Yes, maybe the number of inserts is simply too large for single insert operations. Did you count how many new cases will be created?
into doc("US")
Are you inserting into a document or a database? In the latter case, you could replace the function call with db:open. The db:copynode option can probably be dropped, as it only affects the construction of new nodes in XQuery (e.g. via "element abc { ... }"). It MAY be a difference if you use a single insert statement (I’m not sure if that matters for your use case): let $nodes := ( for $file in $files return doc($file)/trademark/..... ) return insert nodes $nodes into db:open('US')