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

Method insert_data

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

Source from the content-addressed store, hash-verified

2558
2559 @classmethod
2560 def insert_data(cls, connection):
2561 A, B, C = cls.classes("A", "B", "C")
2562
2563 session = Session(connection)
2564
2565 for i in range(1, 6):
2566 b_list = []
2567 for j in range(1, 4):
2568 b_id = (i * 6) + j
2569 c_id = b_id + 1
2570
2571 b_list.append(B(id=b_id, cs=[C(id=c_id)]))
2572 session.add(A(id=i, bs=b_list))
2573 session.commit()
2574
2575 def test_chained_selectinload_with_two_custom_chunksize(self):
2576 A, B, C = self.classes("A", "B", "C")

Callers

nothing calls this directly

Calls 7

addMethod · 0.95
commitMethod · 0.95
SessionClass · 0.90
BClass · 0.70
CClass · 0.70
AClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected