ã¿ã¤ãã«ã«æ¸ããããã¨ãé·ãã¨ã¿ã¤ãã«ä»ãã«å°ãã¾ããã ä»æ¥ã¯ããRuby on Rails ã® ActiveRecord ã® insert_all 㧠MySQLåãã«çºè¡ãããSQLã« ON DUPLICATE KEY UPDATE foo = foo ãå«ã¾ãã¦ããçç±ãã«ã¤ãã¦ãç¥ã£ã¦ããããï¼èª¿ã¹ã¾ããï¼ TL;DR Ruby on Rails ã® insert_all ã§çºè¡ãããSQLã«ã¯ ON DUPLICATE KEY UPDATE foo = foo ãæ«å°¾ã«æå®ããã¦ãã foo ã¯ã©ããã INSERT INTO ã§ç»é²å ã¨ãã¦æå®ãã¦ããåã®1çªç® upsert_all ã« ON DUPLICATE KEY UPDATE ãæå®ããã¦ãããªãã¾ã ãããinsert_all ã«ãã®æå®ãããã®ã¯æè¦çã«æ°æã¡æªã 該å½ã®å®è£ é¨åã¯ãã https://github
{{#tags}}- {{label}}
{{/tags}}