ã§ã¯ãmydata.scalaã«è¨è¿°ããã¦ããå 容ã«ã¤ãã¦ããã®å½¹å²ãã¨ã«æ´çãã¦èª¬æããã¦ããã¾ãããã âãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ãéå§ãã DB.withConnection ãã¼ã¿ãã¼ã¹ãæ±ãå ´åãã¾ãæåã«ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ãéå§ããå¿ è¦ãããã¾ãããããè¡ãªã£ã¦ããã®ã以ä¸ã®æã§ãã DB.withConnection { implicit c => â¦â¦å®è¡ããå¦çâ¦â¦ } implicit cï¼å¤æ°cï¼ã«ã¯ããã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ã管çããConnectionã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ãè¨å®ããã¾ãããã®{}å ã§ããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹å¦çãç¨æãã¾ãã âexecuteUpdateã¡ã½ãã ãã¼ã¿ã®è¿½å ã¯ãaddDataã¡ã½ããã§è¡ãªã£ã¦ãã¾ããããã§ã¯DB.withConnectionã§ä»¥ä¸ã®ãããªæãå®è¡ãã¦ãã¾ãã val id: Int = SQL( å®è¡ããæ ). on
{{#tags}}- {{label}}
{{/tags}}