MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / insert_data

Method insert_data

test/orm/test_ac_relationships.py:66–79  ·  view source on GitHub ↗
(cls, connection)

Source from the content-addressed store, hash-verified

64
65 @classmethod
66 def insert_data(cls, connection):
67 A, B, C = cls.classes("A", "B", "C")
68
69 s = Session(connection)
70 s.add_all([A(id=i) for i in range(1, 4)])
71 s.flush()
72 s.add_all(
73 [
74 B(a_id=i, cs=[C(), C()])
75 for i in range(1, 4)
76 for j in range(1, 21)
77 ]
78 )
79 s.commit()
80
81
82class AliasedClassRelationshipTest(

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected