(self, query_expression_fixture)
| 1592 | ) |
| 1593 | |
| 1594 | def test_with_expr_two(self, query_expression_fixture): |
| 1595 | User = query_expression_fixture |
| 1596 | |
| 1597 | stmt = select(User.id, User.name, (User.name + "foo").label("foo")) |
| 1598 | |
| 1599 | subq = stmt.subquery() |
| 1600 | u1 = aliased(User, subq) |
| 1601 | |
| 1602 | stmt = select(u1).options(with_expression(u1.value, subq.c.foo)) |
| 1603 | |
| 1604 | self.assert_compile( |
| 1605 | stmt, |
| 1606 | "SELECT anon_1.foo, :param_1 AS anon_2, anon_1.id, " |
| 1607 | "anon_1.name FROM " |
| 1608 | "(SELECT users.id AS id, users.name AS name, " |
| 1609 | "users.name || :name_1 AS foo FROM users) AS anon_1", |
| 1610 | ) |
| 1611 | |
| 1612 | def test_with_expr_three(self, query_expression_w_joinedload_fixture): |
| 1613 | """test :ticket:`6259`""" |
nothing calls this directly
no test coverage detected