{"author_url":"https://blog.hatena.ne.jp/i2bskn/","title":"ActiveRecord\u4ee3\u66ff: mysql2\u3092\u5229\u7528\u3057\u305fDB\u64cd\u4f5c\u306e\u30e1\u30e2","description":"Ruby\u3067DB\u64cd\u4f5c\u3092\u3059\u308b\u969b\u306fActiveRecord\u3092\u5229\u7528\u3059\u308b\u306e\u3067\u3059\u304c\u3001\u4e8b\u60c5\u304c\u3042\u3063\u3066ActiveRecord\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u74b0\u5883\u3067DB\u64cd\u4f5c\u306e\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067mysql2\u306e\u64cd\u4f5c\u3092\u3059\u308b\u30e1\u30e2\u3002 \u4fe1\u983c\u3067\u304d\u306a\u3044\u6587\u5b57\u5217\u3092\u5229\u7528\u3057\u3066SQL\u3092\u7d44\u307f\u7acb\u3066\u308b\u6642\u306fMysql2::Client.escape\u3059\u308b\u306e\u3092\u5fd8\u308c\u305a\u306b\u3002 require \"mysql2\" host = \"example.rds.amazonaws.com\" user = \"admin\" password = \"secret\" database = \"example_production\" db = Mysql2::Client.new(host: ho\u2026","version":"1.0","type":"rich","height":"190","url":"https://i2bskn.com/entry/how_to_use_ruby_mysql2","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fi2bskn.com%2Fentry%2Fhow_to_use_ruby_mysql2\" title=\"ActiveRecord\u4ee3\u66ff: mysql2\u3092\u5229\u7528\u3057\u305fDB\u64cd\u4f5c\u306e\u30e1\u30e2 - i2bskn blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"i2bskn blog","published":"2024-06-18 09:48:24","categories":["Ruby","MySQL","Snippet"],"provider_name":"Hatena Blog","width":"100%","image_url":null,"provider_url":"https://hatena.blog","author_name":"i2bskn","blog_url":"https://i2bskn.com/"}