test #10279
(self, stmt_type: testing.Variation)
| 608 | |
| 609 | @testing.variation("stmt_type", ["core", "orm"]) |
| 610 | def test_aliased_delete(self, stmt_type: testing.Variation): |
| 611 | """test #10279""" |
| 612 | if stmt_type.orm: |
| 613 | User = self.classes.User |
| 614 | u1 = aliased(User) |
| 615 | stmt = delete(u1).where(u1.name == "xyz") |
| 616 | elif stmt_type.core: |
| 617 | user_table = self.tables.users |
| 618 | u1 = user_table.alias() |
| 619 | stmt = delete(u1).where(u1.c.name == "xyz") |
| 620 | else: |
| 621 | stmt_type.fail() |
| 622 | |
| 623 | self.assert_compile( |
| 624 | stmt, |
| 625 | "DELETE FROM users AS users_1 WHERE users_1.name = :name_1", |
| 626 | ) |
| 627 | |
| 628 | @testing.variation("stmt_type", ["core", "orm"]) |
| 629 | def test_add_cte(self, stmt_type: testing.Variation): |