title: MySQL and SQLAlchemy integer diversion in WHERE clause
body: <p>I have a table that contains a column called <code>region_code</code> with <code>Integer</code> as its datatype. In my Python program I have this line:</p>
  
  <pre><code>region = session.query(Region).filter(Region.region_code/100 == region_prefix).one()
  </code></pre>
  
  <p>The important part here is the chosen <strong>filter</strong> method</p>
  
  <pre><code>Region.region_code/100 == region_prefix
  </code></pre>
  
  <p>where region_code is the integer column in the table and the region_prefix variable holds an integer value </p>
  
  <p>The <code>region_code</code> is the integer column in the table containing values like <code>1199, 1200, 1300, 1499</code> while the region_prefix variable (from the program) holds integer values like <code>11, 12, 13, 14</code>. </p>
  
  <p>What I now want to achive with this filter option is to perform an integer division on <code>region_code</code> (hence cut everything behind the decimal place) to be able to compare it with <code>region_prefix</code>.</p>
  
  <p><br>
  <strong>Example:</strong></p>
  
  <pre><code>region_prefix = 11
  </code></pre>
  
  <p>Assume that in the Region table exists a entry with </p>
  
  <pre><code>region_code = 1199
  </code></pre>
  
  <p>The calculation within the filter should look like this</p>
  
  <pre><code>1199 / 100 = 11
  </code></pre>
  
  <p>So with this result I am able to filter for <code>region_prefix (11=11)</code>.
  <strong>This works just fine with MSSQL (Microsoft).</strong></p>
  
  <p><br>
  Unfortunately (in my case) <strong>MySQL</strong> division operator <code>/</code> does not do integer divisions. So the result of <code>1199/100</code> will be <code>11.99</code> and so my query will not find a fitting entry in the DB (because 11.99 != 11).
  Nevertheless MySQL actually has the inter division implemented: the <strong>DIV</strong> operator.</p>
  
  <p>So the following SQL query works just fine for me:</p>
  
  <pre><code>SELECT * FROM Region where region_code DIV 100 = 11;
  </code></pre>
  
  <p><br>
  <strong>So my question is:</strong>
  <em>How do I get the SQLAlchemy <code>filter</code> method to use <code>DIV</code> instead of <code>/</code> operator? Is this possible? Or is the only workaround to use native queries?</em></p>