Changes

Jump to navigation Jump to search
269 bytes added ,  17:28, 24 May 2012
===Pending Update List===
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, the PUL. At the end of a query, all update primitives on this list are applied in a strict the following order after some compatibility tests. If a conflict exists, an error message is returned and all accessed databases remain untouched (atomicity). For the user this means updates are only visible '''after''' the end of a snapshot. If we have the document:
<pre class="brush:xml">
<doc> <a/> </doc>insertinsert intoinsert into lastinsert attributeinsert into firstreplace valuerenameputreplacedeleteinsert beforedb:add()db:store()db:replace()db:rename()db:delete()db:optimize()
</pre>
If a conflict exists between the planned update operations, 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.. and perform the following query: ====Example====The query…
<pre class="brush:xquery">
</pre>
The …applied on the document… <pre class="brush:xml"><doc> <a/> </doc></pre> …results in the following document looks like this:
<pre class="brush:xml">
</pre>
Despite explicitly renaming all child nodes of {{Mono|<doc/>}}, the former {{Mono|<a/> }} element is the only one to be renamed. The {{Mono|<b/> }} element is inserted within the same snapshot and is therefore not yet visible to the user.
===Returning Results===
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu