MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_alias

Method test_alias

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

Source from the content-addressed store, hash-verified

107 )
108
109 def test_alias(self):
110 table1 = self.tables.mytable
111
112 talias1 = table1.alias("t1")
113 stmt = delete(talias1).where(talias1.c.myid == 7)
114
115 self.assert_compile(
116 stmt, "DELETE FROM mytable AS t1 WHERE t1.myid = :myid_1"
117 )
118
119 def test_non_correlated_select(self):
120 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