<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>askul_yuyak</author_name>
  <author_url>https://blog.hatena.ne.jp/askul_yuyak/</author_url>
  <blog_title>ASKUL Engineering BLOG</blog_title>
  <blog_url>https://tech.askul.co.jp/</blog_url>
  <categories>
    <anon>Spring</anon>
  </categories>
  <description>アスクルの こたにん (@Kotanin0) です。 アスクルでは、O/Rマッパーに MyBatis3 を使っています。 MyBatisは、単純なCRUD操作だけでなく、 動的SQL という便利な拡張構文があります。 たとえば、本の情報を管理するテーブルから、本の一覧を抽出したいSQLがあったとします。 本のタイトルを指定しなければ全件SELECT 本のタイトルを指定していればWHERE句を入れてSELECT と、本のタイトルの指定有無でif文を書きたいような場面では、次のように if 要素を利用すると解決できます。 &lt;select&gt; SELECT * FROM BOOK &lt;if test=&quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.askul.co.jp%2Fentry%2F2022%2F02%2F28%2F090000&quot; title=&quot;MyBatis 動的SQL の trim が便利なので使い方のまとめ（ついでにコード読んでみた） - ASKUL Engineering BLOG&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>2022-02-28 09:00:00</published>
  <title>MyBatis 動的SQL の trim が便利なので使い方のまとめ（ついでにコード読んでみた）</title>
  <type>rich</type>
  <url>https://tech.askul.co.jp/entry/2022/02/28/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
