MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_correlated_update_seven

Method test_correlated_update_seven

test/sql/test_update.py:363–380  ·  test/sql/test_update.py::UpdateTest.test_correlated_update_seven
(self)

Source from the content-addressed store, hash-verified

361 )
362
363 def test_correlated_update_seven(self):
364 table1 = self.tables.mytable
365 table2 = self.tables.myothertable
366
367 u = (
368 table1.update()
369 .values(name=class="st">"foo")
370 .where(table2.c.otherid == table1.c.myid)
371 )
372
373 class="cm"># this is the class="st">"default_enhanced" compiler. there's no UPDATE FROM
374 class="cm"># in the base compiler.
375 class="cm"># See also test/dialect/mssql/test_compiler->test_update_from().
376 self.assert_compile(
377 u,
378 class="st">"UPDATE mytable SET name=:name "
379 class="st">"FROM myothertable WHERE myothertable.otherid = mytable.myid",
380 )
381
382 def test_binds_that_match_columns(self):
383 class="st">"""test bind params named after column names

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