SQLAlchemy query using both ilike and contains as filters
<p>I'm trying to use both .contains and .ilike to filter a query from a string value.</p>

<p>For example the query should look something like this:</p>

<pre><code>model.query.filter(model.column.contains.ilike("string").all()
</code></pre>

<p>Currently querying by .contains returns case sensitive results. And querying by ilike returns case unsensitive results, but the characters must match which is far too specific a query. I want potential results to appear to the user as they do with a .contains query.</p>

<p>foo = model.query.filter(model.column.ilike("%"+ string_variable +"%")).all()</p>

python sqlalchemy