Changes

Jump to navigation Jump to search
405 bytes added ,  16:43, 13 December 2014
The most important thing to keep in mind when using XQuery Update is the Pending Update List (PUL). Updating statements are not executed immediately, but are first collected as update primitives within a set-like structure. At the end of a query, after some consistency checks and optimizations, the update primitives will be applied in the following order:
<pre class="brush* '''Backups (1)''':xml">{{Code|db:create-backup()}}* '''XQuery Update''': {{Code|insert before}}, {{Code|delete}}, {{Code|replace}}, {{Code|rename}}, {{Code|replace value}}, {{Code|insertattribute}}, {{Code|insert into first}}, {{Code|insert into}}, {{Code|insert into last}}, {{Code|insert attribute}}, {{Code|insert into firstreplace valuerenameafter}}, {{Code|put}}replacedeleteinsert before* '''Documents''': {{Code|db:add()}}, {{Code|db:store()}}, {{Code|db:replace()}}, {{Code|db:rename()}}, {{Code|db:delete()}}, {{Code|db:optimize()}}, {{Code|db:flush()}},* '''Users''': {{Code|user:grant()}}, {{Code|user:password()}}, {{Code|user:drop()}}, {{Code|user:alter()}}, {{Code|user:create()}}* '''Databases''': {{Code|db:copy()}}, {{Code|db:drop()}}, {{Code|db:alter()}}, {{Code|db:create()}}* '''Backups (2)''': {{Code|db:restore()}}, {{Code|db:drop-backup()</pre>}}
If an inconsistency is found, an error message is returned and all accessed databases remain untouched (atomicity). For the user, this means that updates are only visible '''after''' the end of a snapshot.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu