fn map_insert(
map: MapRef<'_>,
key: Option<ScalarRefImpl<'_>>,
value: Option<ScalarRefImpl<'_>>,
) -> MapValue
Expand description
Inserts a key-value pair into the map. If the key already exists, the value is updated.
ยงExample
query T
select map_insert(map{'a':1, 'b':2}, 'c', 3);
----
{a:1,b:2,c:3}
query T
select map_insert(map{'a':1, 'b':2}, 'b', 4);
----
{a:1,b:4}
TODO: support variadic arguments