MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / insert_data

Method insert_data

test/orm/test_selectin_relations.py:3460–3474  ·  view source on GitHub ↗
(cls, connection)

Source from the content-addressed store, hash-verified

3458
3459 @classmethod
3460 def insert_data(cls, connection):
3461 A, B = cls.classes("A", "B")
3462
3463 s = Session(connection)
3464 b1, b2 = B(id=1, x=5, y=9), B(id=2, x=10, y=8)
3465 s.add_all(
3466 [
3467 A(id=1, b=b1),
3468 A(id=2, b=b2),
3469 A(id=3, b=b2),
3470 A(id=4, b=None),
3471 A(id=5, b=b1),
3472 ]
3473 )
3474 s.commit()
3475
3476 def test_omit_join_warn_on_true(self):
3477 with testing.expect_warnings(

Callers

nothing calls this directly

Calls 5

add_allMethod · 0.95
commitMethod · 0.95
SessionClass · 0.90
BClass · 0.70
AClass · 0.70

Tested by

no test coverage detected