Load Core result rows using Core / fetchmany.
(n)
| 144 | |
| 145 | @Profiler.profile |
| 146 | def test_core_fetchmany(n): |
| 147 | """Load Core result rows using Core / fetchmany.""" |
| 148 | |
| 149 | with engine.connect() as conn: |
| 150 | result = conn.execute(Customer.__table__.select().limit(n)) |
| 151 | while True: |
| 152 | chunk = result.fetchmany(10000) |
| 153 | if not chunk: |
| 154 | break |
| 155 | for row in chunk: |
| 156 | row.id, row.name, row.description |
| 157 | |
| 158 | |
| 159 | @Profiler.profile |