title: SQLAlchemy filter in_ operator
body: <p>I am trying to do a simple filter operation on a query in sqlalchemy, like this:</p>
  
  <pre><code>q = session.query(Genotypes).filter(Genotypes.rsid.in_(inall))
  </code></pre>
  
  <p>where </p>
  
  <p>inall is a list of strings
  Genotypes is mapped to a table:
      class Genotypes(object):
          pass</p>
  
  <pre><code>Genotypes.mapper = mapper(Genotypes, kg_table, properties={'rsid': getattr(kg_table.c, 'rs#')})
  </code></pre>
  
  <p>This seems pretty straightforward to me, but I get the following error when I execute the above query by doing <code>q.first()</code>:</p>
  
  <blockquote>
    <p>"sqlalchemy.exc.OperationalError: (OperationalError) too many SQL
    variables u'SELECT" followed by a list of the 1M items in the <em>inall</em>
    list. But they aren't supposed to be SQL variables, just a list whose
    membership is the filtering criteria.</p>
  </blockquote>
  
  <p>Am I doing the filtering incorrectly?</p>
  
  <p>(the db is sqlite)</p>