<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>igatea</author_name>
  <author_url>https://blog.hatena.ne.jp/igatea/</author_url>
  <blog_title>いがにんのぼやき</blog_title>
  <blog_url>https://igatea.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>最近Goでsqlxを使っているが、毎回忘れるのでメモ IN句を用いたクエリ sqlxでIN句を用いたクエリを使うにはそのままクエリを投げることはできない。 一度 sqlx.In を通してあげる必要がある。 type Hoge struct { Id string `db:&quot;id&quot;` } db, err := sqlx.Connect(&quot;mysql&quot;, &quot;接続情報&quot;) if err != nil { panic(err) } query := ` SELECT id FROM hoge WHERE id IN (?) ` idList := []string{&quot;aaa&quot;, &quot;bbb&quot;, &quot;ccc…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Figatea.hatenablog.com%2Fentry%2F2020%2F12%2F22%2F200000&quot; title=&quot;sqlxでIN句を使う方法 - いがにんのぼやき&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-12-22 20:00:00</published>
  <title>sqlxでIN句を使う方法</title>
  <type>rich</type>
  <url>https://igatea.hatenablog.com/entry/2020/12/22/200000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
