Changes

Jump to navigation Jump to search
100 bytes removed ,  17:52, 18 November 2020
no edit summary
* The namespace of the function name identifies the Java class.
* The local part of the name, which is rewritten to camel case, identifies a variable or function of that class.
* The middle dot character <code>[httphttps://www.fileformat.info/info/unicode/char/b7/index.htm ·]</code> (&amp;#xB7;, a valid character in XQuery names, but not in Java) can be used to append exact Java parameter types to the function name. Class types must be referenced by their full path.
{| class="wikitable"
Please visit the XQuery 3.0 specification if you want to get more insight into
[httphttps://www.w3.org/TR/xpath-functions-3031/#properties-of-functions function properties].
==Updates==
 
{{Mark|Introduced with Version 9.4.}}
The {{Code|@Updating}} annotation can be applied to mark Java functions that perform write or update operations:
</syntaxhighlight>
An XQuery expression will be {{Updateshandled as an [[XQuery Update#Updating Expressions|updating}} expression]] if it calls a an updating Java function that is marked as updating. In contrast to XQuery update operations, the Java code will immediately be executed, but the result will be cached as if {{Function|Update|update:output}} was called.
The annotation is particularly helpful if combined with a lock annotation.
==Locking==
 
{{Mark|Updated with Version 9.4:}} Single annotation for read and write locks.
By default, a Java function will be executed in parallel with other code. If a Java function performs sensitive operations, it is advisable to explicitly lock the code.
</syntaxhighlight>
When If an XQuery expression calls the Java invokes {{Code|write()}} function, any other query that call {{Code|write()}} or {{Code|read()}} needs to wait for the query to be finished. The {{Code|read()}} function can be run in parallel; only those queries are queued that call {{Code|write()}}.
More details on concurrent querying can be found in the article on [[Transaction Management]].
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu