title: sqlalchemy how to using AND in OR operation?
body: <p>i need to do this query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT *
  FROM tbl_member
  WHERE (member_type==1 AND member_status==1)
     OR (member_type==2 and member_status==2)
  </code></pre>
  
  <p>i've tried:</p>
  
  <pre><code>q=session.query(tbl_member) \
    .filter(or_(and_(tbl_member.member_type==1,tbl_member.member_status==1), \
                and_(tbl_member.member_type==2,tbl_member.member_status==2)))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>q=session.query(tbl_member) \ 
    .filter(or_((and_(tbl_member.member_type==1,tbl_member.member_status==1)), \
                (and_(tbl_member.member_type==2,tbl_member.member_status==2))))
  </code></pre>
  
  <p>the query sql still like this:
  </p>
  
  <pre><code>SELECT *
  FROM tbl_member
  WHERE member_type==1 AND member_status==1 OR member_type==2 AND member_status==2
  </code></pre>
  
  <p>how should i do?</p>