Changes

Jump to navigation Jump to search
41 bytes removed ,  18:25, 18 July 2022
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. After the evaluation of the query, and after some consistency checks and optimizations, the update primitives will be applied in the following order:
* '''Backups, Binary resources''': {{Code|db:alter-backup()}}, {{Code|db:create-backup()}}, {{Code|db:store()}}
* '''XQuery Update''': {{Code|insert before}}, {{Code|delete}}, {{Code|replace}}, {{Code|rename}}, {{Code|replace value}}, {{Code|insert attribute}}, {{Code|insert into first}}, {{Code|insert into}}, {{Code|insert into last}}, {{Code|insert}}, {{Code|insert after}}, {{Code|put}}
* '''Documents''': {{Code|db:add()}}, {{Code|db:replace()update}}, {{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 ''': {{Code|db:restore()}}, {{Code|db:drop-backup()}}
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