MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_alias

Method test_alias

test/sql/test_delete.py:107–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 )
106
107 def test_alias(self):
108 table1 = self.tables.mytable
109
110 talias1 = table1.alias("t1")
111 stmt = delete(talias1).where(talias1.c.myid == 7)
112
113 self.assert_compile(
114 stmt, "DELETE FROM mytable AS t1 WHERE t1.myid = :myid_1"
115 )
116
117 def test_non_correlated_select(self):
118 table1, table2 = self.tables.mytable, self.tables.myothertable

Callers

nothing calls this directly

Calls 4

deleteFunction · 0.90
assert_compileMethod · 0.80
aliasMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected