I\'d like to run a query that selects all posts, case insensitive, that have titles that match \'%\' + [some_phrase] + \'%\'. That is, select all rows that have
\'%\' + [some_phrase] + \'%\'
I think it should work
Post.query.filter(Post.title.ilike('%some_phrase%'))
http://docs.sqlalchemy.org/en/latest/orm/internals.html?highlight=ilike#sqlalchemy.orm.attributes.QueryableAttribute.ilike