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

Method insert_data

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

Source from the content-addressed store, hash-verified

2263
2264 @classmethod
2265 def insert_data(cls, connection):
2266 A, B = cls.classes("A", "B")
2267
2268 session = Session(connection)
2269 session.add_all(
2270 [
2271 A(id1=i, id2=i + 2, bs=[B(id=(i * 6) + j) for j in range(6)])
2272 for i in range(1, 20)
2273 ]
2274 )
2275 session.commit()
2276
2277 def test_load_o2m(self):
2278 A, B = self.classes("A", "B")

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected