<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>otiai10</author_name>
  <author_url>https://blog.hatena.ne.jp/otiai10/</author_url>
  <blog_title>DRYな備忘録</blog_title>
  <blog_url>https://otiai10.hatenablog.com/</blog_url>
  <categories>
    <anon>go</anon>
    <anon>mysql</anon>
  </categories>
  <description>問題 Go言語でMySQLを使う案件があったので、Goに標準のdatabase/sqlパッケージを使う（あとgithub.com/go-sql-driver/mysqlパッケージも）。問題はdatabase/sqlパッケージの*sql.DBが持ってるQueryメソッドがデフォルトで実装しているplaceholder機能を以下のように使おうとした db, _ := sql.Open(&quot;mysql&quot;, &quot;myuser:mypass@tcp(localhost:3306)/mydb&quot;) rows, e := db.Query(&quot;SELECT * FROM ? WHERE age &lt; ?&quot;,&quot;user…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fotiai10.hatenablog.com%2Fentry%2F2014%2F05%2F31%2F021925&quot; title=&quot;Go言語`database/sql`パッケージのplaceholderが効かない【小学生は最高だぜ】 - DRYな備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://cdn-ak.f.st-hatena.com/images/fotolife/o/otiai10/20130810/20130810204714.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-05-31 02:19:25</published>
  <title>Go言語`database/sql`パッケージのplaceholderが効かない【小学生は最高だぜ】</title>
  <type>rich</type>
  <url>https://otiai10.hatenablog.com/entry/2014/05/31/021925</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
