我有表名VenueSetting
id prefix type
------------------
1 456 1
2 8 2
3 4560 3
如何使用 SqlAchemy ORM查询查询输入数字以匹配数据库中的前缀,反向版本为like
类似这样的查询
from_phone = '456789000'
session.query(VenueSetting).
filter(from_phone.like(VenueSetting.prefix + '%')).
first()
#expect result is record with id=1 in database