<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Palanikumar:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>On one hand, you should show us what’s in your <i class="">Some</i> variable.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>On the other hand, you don’t seem to be using <i class=""><a href="maps:get/3" class="">maps:get/3</a></i> as it’s intended to be used (check <a href="http://erldocs.com/20.0/stdlib/maps.html?i=1&search=maps:get#get/3" class="">the docs</a>).</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Even more so, you should know that in Erlang variables start with an uppercase letter, that’s why in your example <b class="">NULL</b> is a variable name (not a value). See how Erlang VM tells you that the variable ‘NULL’ is unbound.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Hope this helps,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>Cheers!<br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><span id="docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad" class=""><span style="font-size: 11pt; font-family: Arial; font-weight: 700; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class=""><br class="Apple-interchange-newline"><hr class=""></span></span><div class=""><b class=""><i class=""><a href="http://about.me/elbrujohalcon" class="">Brujo Benavides</a></i></b></div></div></div><div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><b class=""><br class=""></b></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Sep 13, 2017, at 09:50, Palanikumar Gopalakrishnan <<a href="mailto:palani@vahaitech.com" class="">palani@vahaitech.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Hi Hugo,<br class=""><br class=""></div>                Null value showed in sql<br class=""><br class=""> +---------------------+<br class="">| NULL                |<br class="">| NULL                |<br class="">+---------------------+<br class=""><br class=""></div>When we applied it with map like below, It returns the following error<br class=""><b class="">(cowboy_ws_server@Erlang)27> maps:get("A", NULL, Some).<br class="">* 1: variable 'NULL' is unbound<br class="">(cowboy_ws_server@Erlang)28> <br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></b><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 13 September 2017 at 17:35, Hugo Mills <span dir="ltr" class=""><<a href="mailto:hugo@carfax.org.uk" target="_blank" class="">hugo@carfax.org.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Sep 13, 2017 at 05:01:37PM +0530, Palanikumar Gopalakrishnan wrote:<br class="">
> Hi Guys,<br class="">
>                 I want to get data from mysql and append them into map. But<br class="">
> some row had null values. Hence i cant able to convert the null value into<br class="">
> map. Its there any way to convert null value into map.<br class="">
<br class="">
</span>   Why can't you put nulls into a map? This works, for example:<br class="">
<br class="">
2> #{null => null}.<br class="">
#{null => null}<br class="">
<br class="">
so we can clearly put some null atom in both key and value positions<br class="">
in a map.<br class="">
<br class="">
   If you could show an example row without a null, and what that<br class="">
turns into when you put it in a map, and then show how this fails when<br class="">
you do have a null, then it might be easier to answer your question.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
   Hugo.<br class="">
<br class="">
--<br class="">
Hugo Mills             | Klytus! Are your men on the right pills? Maybe you<br class="">
hugo@... <a href="http://carfax.org.uk/" rel="noreferrer" target="_blank" class="">carfax.org.uk</a> | should execute their trainer!<br class="">
<a href="http://carfax.org.uk/" rel="noreferrer" target="_blank" class="">http://carfax.org.uk/</a>  |<br class="">
PGP: E2AB1DE4          |                      Ming the Merciless, Flash Gordon<br class="">
</font></span></blockquote></div><br class=""><br clear="all" class=""><br class="">-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><br class=""></div><div class=""><b class="">Warm Regards,</b></div></div><div class=""><br class=""></div><div class=""><span style="background-color:rgb(255,255,255)" class=""><span style="font-size:12.8px" class=""><b class="">Palanikumar Gopalakrishnan </b></span></span><img src="https://ssl.gstatic.com/mail/emoji/6/48px/emoji_u270c.png" alt="✌" style="font-size:small;margin:0px 0.2ex;vertical-align:middle;height:24px;width:24px" class=""><span style="background-color:rgb(255,255,255)" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;background-color:rgb(255,255,255)" class=""><b class="">Developer</b></span><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></div></div></div></div></div></div>
</div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></body></html>