Changes

Jump to navigation Jump to search
No change in size ,  13:33, 20 July 2022
no edit summary
| ''no lock''
|-
| {{Code|for $db in ('db1', 'db2') return db:preget($db)}}
| Read lock of {{Code|db1}} and {{Code|db2}}, as query is [[XQuery Optimization#Loop Unrolling|unrolled at compile time]].
|-
* {{Code|doc(doc('test')/reference/text())}}
* <code>let $db := 'test' return insert nodes <test/> into db:preget($db)</code>
The functions {{Code|fn:doc}} and {{Code|fn:collection}} can also be used to address that are not stored in a database. However, this may lead to unwanted locks, and you have two options to reduce the number of locks: No database lookups will take place if {{Option|WITHDB}} option is disabled, or if {{Function|Fetch|fetch:doc}} is used instead of {{Code|fn:doc}}.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu