MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_correlated_update_one

Method test_correlated_update_one

test/sql/test_update.py:259–274  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

257 )
258
259 def test_correlated_update_one(self):
260 table1 = self.tables.mytable
261
262 # test against a straight text subquery
263 u = update(table1).values(
264 {
265 table1.c.name: text(
266 "(select name from mytable where id=mytable.id)"
267 )
268 }
269 )
270 self.assert_compile(
271 u,
272 "UPDATE mytable SET name=(select name from mytable "
273 "where id=mytable.id)",
274 )
275
276 def test_correlated_update_two(self):
277 table1 = self.tables.mytable

Callers

nothing calls this directly

Calls 4

updateFunction · 0.90
textFunction · 0.90
assert_compileMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected