| 265 | ) |
| 266 | |
| 267 | def test_recursive_union_no_alias_one(self): |
| 268 | s1 = select(literal(0).label("x")) |
| 269 | cte = s1.cte(name="cte", recursive=True) |
| 270 | cte = cte.union_all(select(cte.c.x + 1).where(cte.c.x < 10)) |
| 271 | s2 = select(cte) |
| 272 | self.assert_compile( |
| 273 | s2, |
| 274 | "WITH RECURSIVE cte(x) AS " |
| 275 | "(SELECT :param_1 AS x UNION ALL " |
| 276 | "SELECT cte.x + :x_1 AS anon_1 " |
| 277 | "FROM cte WHERE cte.x < :x_2) " |
| 278 | "SELECT cte.x FROM cte", |
| 279 | ) |
| 280 | |
| 281 | def test_recursive_union_alias_one(self): |
| 282 | s1 = select(literal(0).label("x")) |