Changes

Jump to navigation Jump to search
183 bytes added ,  23:49, 19 March 2014
===Returning Results===
It 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. The only way to perform any updating queries and return a result at the same time is to use the BaseX-specific <code>[[Database Module#db:output|dbBut there are two ways out:output()]]</code> function, which caches the results of its arguments at runtime and returns them after all updates have been processed.
Example* The BaseX-specific <code>[[Database Module#db: Perform output|db: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 return returns a success message.:
<pre class="brush:xquery">
db:output("Update successful."), insert node <c/> into doc('factbook')/mondial
</pre>
 
* Since {{Version|8.0}}, the [[Options#MIXUPDATE|MIXUPDATE]] option is available. All updating constraints will be turned off. Nodes will be copied before they are modified by updating expressions.
If you want to modify temporary nodes in main memory without storing them in a database, you can use the [[Update#transform|transform expression]].
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu