How Do I Express "where 'value' Like Column" In Sqlalchemy?
I'm trying to do a where clause in reverse order with SQLAlchemy ORM. So instead of Table.query.filter(Table.column.like(value)), I'd like to end up with... select * from table whe
Solution 1:
This works for me.
from sqlalchemy.sql.expression import literal
Table.query.filter(literal('mail.google.com').like(Table.domain)
Post a Comment for "How Do I Express "where 'value' Like Column" In Sqlalchemy?"