MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / go

Method go

test/orm/test_lambdas.py:441–451  ·  view source on GitHub ↗
(ids, values)

Source from the content-addressed store, hash-verified

439 s = Session(testing.db, future=True)
440
441 def go(ids, values):
442 stmt = lambda_stmt(lambda: update(User).where(User.id.in_(ids)))
443 s.execute(
444 stmt,
445 values,
446 # note this currently just unrolls the lambda on the statement.
447 # so lambda caching for updates is not actually that useful
448 # unless synchronize_session is turned off.
449 # evaluate is similar just doesn't work for IN yet.
450 execution_options={"synchronize_session": "fetch"},
451 )
452
453 go([1, 2], {"name": "jack2"})
454 eq_(

Callers

nothing calls this directly

Calls 5

lambda_stmtFunction · 0.90
updateFunction · 0.90
whereMethod · 0.45
in_Method · 0.45
executeMethod · 0.45

Tested by

no test coverage detected