SQLAlchemy中模糊查询,如何like多个关键字-灵析社区

英勇投弹手

from sqlalchemy import and_ words = ['%三%', '%猫%'] rule = and_(*[table.u_name.like(w) for w in words]) table.query.filter(rule)

阅读量:1

点赞量:0

问AI