<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>troter</author_name>
  <author_url>https://blog.hatena.ne.jp/troter/</author_url>
  <blog_title>放牧日記</blog_title>
  <blog_url>https://troter.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>dm-core-1.2.0の話です。 現在の検索条件でidだけ取得したい、、10000件くらい。って要望、よくあると思う。:fieldsで指定しても、モデルのインスタンスを作るため、sqlを直接実行した時にはかなわなかったりする。 なので、DataMapper::Collectionに次のようなメソッドを生やしている。 module DataMapper class Collection &lt; LazyArray def select_statement(repository_name = :default) DataMapper.repository(repository_name).adap…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftroter.hatenablog.jp%2Fentry%2F20130418%2F1366247999&quot; title=&quot;DataMapperで比較的高速にidだけ取得する - 放牧日記&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>2013-04-18 10:19:59</published>
  <title>DataMapperで比較的高速にidだけ取得する</title>
  <type>rich</type>
  <url>https://troter.hatenablog.jp/entry/20130418/1366247999</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
