I know I can use the label method for alias, but I can't figure out how to use the labeled element later in the query - something like the following:
session.query(Foo.bar.label("foobar")).filter(foobar > 10).all()
Of course, this doesn't work since there is no variable called foobar. How could this be accomplished?
(The over simplified example was just for easy comprehension...)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…