Individual INSERT/COMMIT pairs using the "bulk" API
(n)
| 57 | |
| 58 | @Profiler.profile |
| 59 | def test_bulk_save(n): |
| 60 | """Individual INSERT/COMMIT pairs using the "bulk" API""" |
| 61 | |
| 62 | for i in range(n): |
| 63 | session = Session(bind=engine) |
| 64 | session.bulk_save_objects( |
| 65 | [ |
| 66 | Customer( |
| 67 | name="customer name %d" % i, |
| 68 | description="customer description %d" % i, |
| 69 | ) |
| 70 | ] |
| 71 | ) |
| 72 | session.commit() |
| 73 | |
| 74 | |
| 75 | @Profiler.profile |
nothing calls this directly
no test coverage detected