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

Method insert_data

test/ext/test_associationproxy.py:3680–3691  ·  view source on GitHub ↗
(cls, connection)

Source from the content-addressed store, hash-verified

3678
3679 @classmethod
3680 def insert_data(cls, connection):
3681 A, B = cls.classes("A", "B")
3682
3683 s = Session(connection)
3684 s.add_all(
3685 [
3686 A(id=1, bs=[B(data="b1"), B(data="b2")]),
3687 A(id=2, bs=[B(data="b3"), B(data="b4")]),
3688 ]
3689 )
3690 s.commit()
3691 s.close()
3692
3693 def test_plain_collection_gc(self):
3694 A, B = self.classes("A", "B")

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected