[erlang-questions] How to insert null value into map

Hugo Mills <>
Wed Sep 13 14:05:13 CEST 2017

On Wed, Sep 13, 2017 at 05:01:37PM +0530, Palanikumar Gopalakrishnan wrote:
> Hi Guys,
>                 I want to get data from mysql and append them into map. But
> some row had null values. Hence i cant able to convert the null value into
> map. Its there any way to convert null value into map.

   Why can't you put nulls into a map? This works, for example:

2> #{null => null}.
#{null => null}

so we can clearly put some null atom in both key and value positions
in a map.

   If you could show an example row without a null, and what that
turns into when you put it in a map, and then show how this fails when
you do have a null, then it might be easier to answer your question.


Hugo Mills             | Klytus! Are your men on the right pills? Maybe you
 carfax.org.uk | should execute their trainer!
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                      Ming the Merciless, Flash Gordon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170913/6f9bb84b/attachment.bin>

More information about the erlang-questions mailing list