Changes

Jump to navigation Jump to search
10 bytes added ,  11:13, 9 August 2018
By default, it is not possible to mix different types of expressions in a query result. The outermost expression of a query must either be a collection of updating or non-updating expressions. But there are two ways out:
* The BaseX-specific <code>[[Database Update Module#dbupdate:output|dbupdate:output()]]</code> function bridges this gap: it caches the results of its arguments at runtime and returns them after all updates have been processed. The following example performs an update and returns a success message:
<pre class="brush:xquery">
dbupdate:output("Update successful."), insert node <c/> into doc('factbook')/mondial
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu