<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>posturan</author_name>
  <author_url>https://blog.hatena.ne.jp/posturan/</author_url>
  <blog_title>Oboe吹きプログラマの黙示録</blog_title>
  <blog_url>https://oboe2uran.hatenablog.com/</blog_url>
  <categories>
    <anon>mybatis</anon>
  </categories>
  <description>良く記述するパターン、 パラメータ変数 String type; に対して、、 WHERE 1=1 &lt;if test=&quot;type == null&quot;&gt; AND id = #{id} &lt;/if&gt; &lt;if test=&quot;type != null&quot;&gt; 文字列比較：空文字 &lt;if test=&quot;type == ''&quot;&gt; 文字列比較：任意 &lt;if test=&quot;type == 'A012'&quot;&gt; 以外にもあまり書かないパターンで、 パラメータ変数の型が boolean なら、 boolean flg であれば、 &lt;if test=&quot;flg&quot;&gt; で、flg = true で then &lt;if test=&quot;!flg&quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foboe2uran.hatenablog.com%2Fentry%2F2023%2F03%2F18%2F134004&quot; title=&quot;mybatis の if 文 - Oboe吹きプログラマの黙示録&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>2023-03-18 13:40:04</published>
  <title>mybatis の if 文</title>
  <type>rich</type>
  <url>https://oboe2uran.hatenablog.com/entry/2023/03/18/134004</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
