Changes

Jump to navigation Jump to search
2 bytes added ,  15:59, 8 July 2021
The conversion back to XQuery can be controlled with the {{Option|WRAPJAVA}} option. The following values exist:
* {{Code|some}} (the default): Java values with the most common types are converted to XQuery, as shown in the second and third column of the table.* {{Code|none}}: The conversion to XQuery items is enforced: Additional to the default conversions, values of type {{Code|Iterator}} and {{Code|Iterable}} (including listsLists, sets Sets and collectionsCollections) are converted to sequences, and maps are converted to XQuery maps. If no conversion is possible, an error is raised. With {{Function|Conversion|convert:from-java}}, the conversion of a wrapped Java object can be enforced.* {{Code|all}}: All values (excluding those inheriting the internal type {{Code|org.basex.query.value.Value}}) will be are returned as wrapped Java objects. This way, they The wrapped objects can be passed on to other Java functions without intermediate conversions. With {{Function|Conversion|convert:from-java}}, the conversion of a wrapped Java object can be enforced as well.
The option can be best specified as via a pragma. In the following example, the result of the first function – a char array – is wrapped and passed on to a {{Code|CharBuffer}} function:
<syntaxhighlight lang="xquery">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu