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

Method insert_data

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

Source from the content-addressed store, hash-verified

3404
3405 @classmethod
3406 def insert_data(cls, connection):
3407 A, B = cls.classes("A", "B")
3408
3409 s = Session(connection)
3410 b1, b2 = B(id=1, x=5, y=9), B(id=2, x=10, y=8)
3411 s.add_all(
3412 [
3413 A(id=1, b_id=1),
3414 A(id=2, b_id=5),
3415 A(id=3, b_id=2),
3416 A(id=4, b=None),
3417 b1,
3418 b2,
3419 ]
3420 )
3421 s.commit()
3422
3423 def test_missing_rec(self):
3424 A, B = self.classes("A", "B")

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