Loading TOC...

map functions

The table below lists all the map built-in functions (in this namespace: http://marklogic.com/xdmp/map).

The map built-in functions are used to create maps. Maps store name-value pairs in an in-memory data structure. You can also persist a map to disk by storing it in a document. Some programming languages implement maps using hash tables, but these map functions make it convenient for you to create and update your own maps.

Maps are represented using the map:map XQuery primitive type. When you serialize an object of map:map type, it serializes to an XML node in the http://marklogic.com/xdmp/map namespace.

12 functions
Function nameDescription
map:clearClear a map.
map:containsReturns true if the key exists in the map.
map:countReturns the number of keys used in the map.
map:deleteDelete a value from a map.
map:entryConstructs a new map with a single entry consisting of the key and value specified as arguments.
map:getGet a value from a map.
map:keysGet the keys used in the map.
map:mapCreates a map.
map:newConstructs a new map by combining the keys from the maps given as an argument.
map:putPut a value into a map at the given key.
map:set-javascript-by-refIf true is specified, sets a map:map to be passed to JavaScript by reference.
map:withUpdates a map, inserting a value into it at the given key.
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy