2024-04-19 16:43:55 发布
网友
我想运行一个基于用户名或电子邮件地址的用户查询。在
我一定找不到了,但是我在peewee文档中找不到如何运行OR查询。你怎么做到的?在
OR
从documentation
If you want to express a complex query, use parentheses and python’s bitwise or and and operators:
>>> Tweet.select().join(User).where( ... (User.username == 'Charlie') | ... (User.username == 'Peewee Herman') ... )
从documentation
相关问题 更多 >
编程相关推荐