<?xml version="1.0"?>

<sqlgg>
 <stmt name="create_table_foo" sql="CREATE TABLE foo(&#x0A;    id INTEGER PRIMARY KEY,&#x0A;    foo TEXT NULL&#x0A;)" category="DDL" kind="create" target="foo" cardinality="0">
  <in/>
  <out/>
 </stmt>
 <stmt name="create_table_bar" sql="CREATE TABLE bar(&#x0A;    foo_id INTEGER NOT NULL,&#x0A;    baz TEXT NOT NULL&#x0A;)" category="DDL" kind="create" target="bar" cardinality="0">
  <in/>
  <out/>
 </stmt>
 <stmt name="find" sql="SELECT * FROM foo&#x0A;WHERE id IN @@ids" category="DQL" kind="select" cardinality="n">
  <in>
   <value name="ids" type="set(Int)"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </out>
 </stmt>
 <stmt name="get" sql="SELECT * FROM foo&#x0A;WHERE (id IN @@ids)&#x0A;LIMIT 1" category="DQL" kind="select" cardinality="0,1">
  <in>
   <value name="ids" type="set(Int)"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </out>
 </stmt>
 <stmt name="find2" sql="SELECT * FROM foo&#x0A;WHERE (id IN @@ids) AND foo NOT IN @@foos" category="DQL" kind="select" cardinality="n">
  <in>
   <value name="ids" type="set(Int)"/>
   <value name="foos" type="set(Text)" nullable="true"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </out>
 </stmt>
 <stmt name="find_with_bar" sql="SELECT * FROM foo&#x0A;WHERE CONCAT(foo, @suffix) IN @@foos_with_suffix" category="DQL" kind="select" cardinality="n">
  <in>
   <value name="suffix" type="Text"/>
   <value name="foos_with_suffix" type="set(Text)"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </out>
 </stmt>
 <stmt name="get2" sql="SELECT * FROM foo&#x0A;WHERE id IN @@ids AND (foo NOT IN @@foos)&#x0A;LIMIT 1" category="DQL" kind="select" cardinality="0,1">
  <in>
   <value name="ids" type="set(Int)"/>
   <value name="foos" type="set(Text)" nullable="true"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </out>
 </stmt>
 <stmt name="join" sql="SELECT *&#x0A;FROM foo f JOIN bar b ON f.id = b.foo_id&#x0A;WHERE b.baz IN @@bazz AND b.baz NOT IN @@notbazz AND LENGTH(f.foo) IN @@lengths" category="DQL" kind="select" cardinality="n">
  <in>
   <value name="bazz" type="set(Text)"/>
   <value name="notbazz" type="set(Text)"/>
   <value name="lengths" type="set(Int)"/>
  </in>
  <out>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
   <value name="foo_id" type="Int"/>
   <value name="baz" type="Text"/>
  </out>
 </stmt>
 <table name="bar">
  <schema>
   <value name="foo_id" type="Int"/>
   <value name="baz" type="Text"/>
  </schema>
 </table>
 <table name="foo">
  <schema>
   <value name="id" type="Int"/>
   <value name="foo" type="Text" nullable="true"/>
  </schema>
 </table>
</sqlgg>
