<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>django</anon>
    <anon>sqlalchemy</anon>
  </categories>
  <description>djangoとsqlalchemyでunion allで繋げるようなものを参照・更新含めて考えてみた。 はじめはdjangoのormでviewを使った方法を考えて、ちょっとしたことからdjangoが思いもしない挙動をしたのでsqlalchemyではどうだったのか確認しようとした。 状況説明 以下のような仮想的な状況を考えた。 X,Y２つのテーブルがある。(例えばactiveなテーブルとhistoryテーブルのようなイメージ) これら２つを対象としたqueryを書きたい 発行するSQLの回数を減らしたい 実際に行う動作は以下の通り。 X,Yをunion allするview(XorY)を考える(参…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2015%2F03%2F08%2F003814&quot; title=&quot;djangoとsqlalchemyでunion allで繋げるようなものを参照・更新含めて考えてみた - podhmo&amp;#39;s diary&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>2015-03-08 00:38:14</published>
  <title>djangoとsqlalchemyでunion allで繋げるようなものを参照・更新含めて考えてみた</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2015/03/08/003814</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
