MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_correlated_update_six

Method test_correlated_update_six

test/sql/test_update.py:347–361  ·  test/sql/test_update.py::UpdateTest.test_correlated_update_six
(self)

Source from the content-addressed store, hash-verified

345 )
346
347 def test_correlated_update_six(self):
348 table1 = self.tables.mytable
349 table2 = self.tables.myothertable
350
351 class="cm"># test correlated FROM implicit in WHERE and SET clauses
352 u = (
353 table1.update()
354 .values(name=table2.c.othername)
355 .where(table2.c.otherid == table1.c.myid)
356 )
357 self.assert_compile(
358 u,
359 class="st">"UPDATE mytable SET name=myothertable.othername "
360 class="st">"FROM myothertable WHERE myothertable.otherid = mytable.myid",
361 )
362
363 def test_correlated_update_seven(self):
364 table1 = self.tables.mytable

Callers

nothing calls this directly

Calls 4

assert_compileMethod · 0.80
whereMethod · 0.45
valuesMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected