(self)
| 2308 | ) |
| 2309 | |
| 2310 | def test_reuse_expr(self): |
| 2311 | A = self.classes.A |
| 2312 | |
| 2313 | s = fixture_session() |
| 2314 | |
| 2315 | # so people will obv. want to say, "filter(A.my_expr > 10)". |
| 2316 | # but that means Query or Core has to post-modify the statement |
| 2317 | # after construction. |
| 2318 | expr = A.x + A.y |
| 2319 | a1 = ( |
| 2320 | s.query(A) |
| 2321 | .options(with_expression(A.my_expr, expr)) |
| 2322 | .filter(expr > 10) |
| 2323 | .order_by(expr) |
| 2324 | ) |
| 2325 | |
| 2326 | eq_(a1.all(), [A(my_expr=12), A(my_expr=15)]) |
| 2327 | |
| 2328 | def test_in_joinedload(self): |
| 2329 | A, B = self.classes("A", "B") |
nothing calls this directly
no test coverage detected