假设我有一个查询对象
query = session.query(SomeModel) \
.filter(SomeModel.foo == 'bar') \
.filter(SomeModel.active == True)
您能否在执行查询之前修改对象列表,保持所有相同的过滤器
IE
.change_query(SomeModel.id, SomeModel.name)
这样生成的查询对象是:
session.query(SomeModel.id, SomeModel.name) \
.filter(SomeModel.foo == 'bar') \
.filter(SomeModel.active == True)