Here are the examples of the python api sqlalchemy.delete.where.where.where taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
View Complete Implementation : test_delete.py
Copyright MIT License
Author : sqlalchemy
Copyright MIT License
Author : sqlalchemy
@testing.requires.delete_from
def test_exec_alias_plus_table(self):
users, addresses = self.tables.users, self.tables.addresses
dingalings = self.tables.dingalings
d1 = dingalings.alias()
testing.db.execute(
delete(d1)
.where(users.c.id == addresses.c.user_id)
.where(users.c.name == "ed")
.where(addresses.c.id == d1.c.address_id)
)
expected = [(2, 5, "ding 2/5")]
self._astert_table(dingalings, expected)