Changes

Jump to navigation Jump to search
52 bytes removed ,  14:24, 16 July 2021
===Conversion to XQuery===
By default, Java values with the most common types (as shown in the second and third column of the table) are converted to XQuery values. All other values are returned as ''Java items'', which are function items with an embedded a wrapped Java value. The results of constructor calls will always be returned as Java items.
The conversion of the embedded wrapped Java value to XQuery is enforced by invoking the function item: Values in {{Code|Iterator}} and {{Code|Iterable}} instances (Lists, Sets and Collections) are converted to items, and maps are converted to XQuery maps:
<syntaxhighlight lang="xquery">
|- valign="top"
| {{Code|some}}
| The default: The Java values of the most common types are converted, others are wrapped into Java items.
|- valign="top"
| {{Code|none}}
|- valign="top"
| {{Code|all}}
| All Java values are wrapped into Java items (excluding those inheriting the internal type {{Code|org.basex.query.value.Value}}) are returned as Java items. This is helpful if Java function calls are chained, and if no intermediate conversion is required or desired.
|- valign="top"
| {{Code|instance}}
| The result of a If the Java call will be ignored, and code was called with a supplied class instance (if there , this instance is any) wrapped into a Java item. Otherwise, the Java value is returned instead.
|- valign="top"
| {{Code|void}}
| The result of a Java call will be values are ignored, and an empty sequence is returned instead.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu