我正在编写SQLAlchemy代码,它接受搜索栏的输入,并对我的PostgreSQL数据库运行一个查询。我想将ilike运算符和in_运算符结合起来。这个是可能的吗?filter((Detail.sellers.ilike.in_(names))).all()
AttributeError: 'function' object has no attribute 'in
data = Column(String)在sql中,我的查询应该是select id from person where id not in (select person_id from foo);
如何在Python和sqlalchemy中实现这一点?我不使用关系,因为我在使用它们时遇到了很多问题,主要是其他线程过期或更改其他线程缓存的数据,以及foo.p