📅  最后修改于: 2022-03-11 15:05:28.739000             🧑  作者: Mango
#Using filter() (and operator)
query = meta.Session.query(User).filter(
User.firstname.like(search_var1),
User.lastname.like(search_var2)
)
#Using filter_by() (and operator)
query = meta.Session.query(User).filter_by(
firstname.like(search_var1),
lastname.like(search_var2)
)