{"categories":["Scala"],"url":"https://tototoshi.hatenablog.com/entry/2017/03/02/205313","image_url":null,"height":"190","blog_url":"https://tototoshi.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftototoshi.hatenablog.com%2Fentry%2F2017%2F03%2F02%2F205313\" title=\"Scala\u3067#map\u7cfb\u30e1\u30bd\u30c3\u30c9\u3067\u526f\u4f5c\u7528\u3092\u8d77\u3053\u3059\u3068\u30d0\u30b0\u308b\u3084\u3064 - tototoshi \u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","provider_name":"Hatena Blog","published":"2017-03-02 20:53:13","title":"Scala\u3067#map\u7cfb\u30e1\u30bd\u30c3\u30c9\u3067\u526f\u4f5c\u7528\u3092\u8d77\u3053\u3059\u3068\u30d0\u30b0\u308b\u3084\u3064","type":"rich","description":"\u9045\u5ef6\u8a55\u4fa1\u3068\u526f\u4f5c\u7528\u306f\u76f8\u6027\u60aa\u3044\u3088\u306d\u3063\u3066\u8a71\u3067\u3059\u3002 Scala\u3067foreach\u3067\u306f\u306a\u304fmap\u306e\u4e2d\u3067\u526f\u4f5c\u7528\u3092\u8d77\u3053\u3059\u3068\u305f\u307e\u306b\u8a55\u4fa1\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u3088\u308b\u308f\u304b\u308a\u3065\u3089\u3044\u30d0\u30b0\u306b\u906d\u9047\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u6b21\u306e\u30b3\u30fc\u30c9\u306fMap#mapValues\u306e\u4e2d\u3067scalikejdbc\u3067\u66f8\u304d\u8fbc\u307f\u3092\u884c\u304a\u3046\u3068\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002 \u4e00\u898b\u3046\u307e\u304f\u3044\u304f\u3088\u3046\u3067\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u624b\u5143\u3067\u306f java.sql.SQLException: Connection is null. \u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u307e\u3059\u3002 import scalikejdbc._ val contents = DB.localTx { implicit session => data.ma\u2026","author_url":"https://blog.hatena.ne.jp/tototoshi/","provider_url":"https://hatena.blog","author_name":"tototoshi","blog_title":"tototoshi \u306e\u65e5\u8a18","version":"1.0"}