Chrome Extension

Like query Sqlalchemy

Like query in Sqlalchemy can be used to find records that have specific keywords based on the query.
#record has 'test' keyword on any position
session.query(User).filter(User.first_name.like('%test%')).all()

#record has 'test' keyword on first position
session.query(User).filter(User.first_name.like('test%')).all()

#record has 'test' keyword on last position
session.query(User).filter(User.first_name.like('%test')).all()
Code faster with devsheet chrome extension and increase productivity as a programmer
search code from your favorite search engine instantly.
Install Now
Was this helpful?
0 Comments
Open Code Manager We are hiring