test #9772
(self)
| 179 | ) |
| 180 | |
| 181 | def test_values_in_scalar_subq(self): |
| 182 | """test #9772""" |
| 183 | |
| 184 | people = self.tables.people |
| 185 | table_value_constructor = values( |
| 186 | Column("v1", Integer), name="tvc" |
| 187 | ).data( |
| 188 | [ |
| 189 | (people.c.people_id,), |
| 190 | (people.c.age,), |
| 191 | (people.c.name,), |
| 192 | ] |
| 193 | ) |
| 194 | |
| 195 | maximum = select(func.max(table_value_constructor.c.v1)) |
| 196 | maximum_subquery = maximum.scalar_subquery() |
| 197 | query = select(people.c.people_id, maximum_subquery) |
| 198 | self.assert_compile( |
| 199 | query, |
| 200 | "SELECT people.people_id, " |
| 201 | "(SELECT max(tvc.v1) AS max_1 FROM " |
| 202 | "(VALUES (people.people_id), (people.age), (people.name)) " |
| 203 | "AS tvc (v1)) AS anon_1 FROM people", |
| 204 | ) |
| 205 | |
| 206 | def test_values_in_select_cte_params(self): |
| 207 | cte1 = select( |
nothing calls this directly
no test coverage detected