Changes

Jump to navigation Jump to search
24 bytes added ,  16:02, 19 July 2022
==Value Resources==
In addition to XML and binary resources, a third resource type has been added: XQuery values (atomic items and nodes, sequences, maps, arrays) can now be stored in databases as well. The {{Function|Database|db:put-value}} and {{Function|Database|db:get-value}} can be used to store to and retrieve values.
The new feature can e.g. be used to store maps in a database:
<syntaxhighlight lang="xquery">
db:put-value(
'factbook',
map:merge(
<syntaxhighlight lang="xquery">
let $cities := db:get-value('factbook', 'cities')
for $country in ('Japan', 'Indonesia', 'Malaysia')
return $country || ': ' || string-join($cities?($country), ', ')
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu