MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / insert_data

Method insert_data

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

Source from the content-addressed store, hash-verified

2371
2372 @classmethod
2373 def insert_data(cls, connection):
2374 A, B = cls.classes("A", "B")
2375
2376 session = Session(connection)
2377 session.add_all(
2378 [
2379 A(id=i, bs=[B(id=(i * 6) + j) for j in range(1, 6)])
2380 for i in range(1, 101)
2381 ]
2382 )
2383 session.commit()
2384
2385 @testing.combinations(
2386 (None, (1, 101)),

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