test #10279
(self, stmt_type: testing.Variation)
| 588 | |
| 589 | @testing.variation("stmt_type", ["core", "orm"]) |
| 590 | def test_aliased_update(self, stmt_type: testing.Variation): |
| 591 | """test #10279""" |
| 592 | if stmt_type.orm: |
| 593 | User = self.classes.User |
| 594 | u1 = aliased(User) |
| 595 | stmt = update(u1).where(u1.name == "xyz").values(name="newname") |
| 596 | elif stmt_type.core: |
| 597 | user_table = self.tables.users |
| 598 | u1 = user_table.alias() |
| 599 | stmt = update(u1).where(u1.c.name == "xyz").values(name="newname") |
| 600 | else: |
| 601 | stmt_type.fail() |
| 602 | |
| 603 | self.assert_compile( |
| 604 | stmt, |
| 605 | "UPDATE users AS users_1 SET name=:name " |
| 606 | "WHERE users_1.name = :name_1", |
| 607 | ) |
| 608 | |
| 609 | @testing.variation("stmt_type", ["core", "orm"]) |
| 610 | def test_aliased_delete(self, stmt_type: testing.Variation): |