mg_map_insert_unsafe

Inserts the given key-value pair into the map.

No check is performed for key uniqueness. Note that map containing duplicate keys is considered invalid in Bolt protocol.

If key length is greated than uint.max or or the map's capacity is exhausted, the insertion will fail. If insertion fails, the map doesn't take ownership of value.

If the insertion is successful, a new mg_string is constructed for the storage of the key and the map takes ownership of value.

extern (C) @safe @nogc
int
mg_map_insert_unsafe
(,
const char* key_str
,)

Parameters

key_str char*

A null-terminated string to be used as key.

value mg_value*

Value to be inserted.

Return: The function returns non-zero value if insertion failed, zero otherwise.

Meta