MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_core_fetchmany

Function test_core_fetchmany

examples/performance/large_resultsets.py:146–156  ·  view source on GitHub ↗

Load Core result rows using Core / fetchmany.

(n)

Source from the content-addressed store, hash-verified

144
145@Profiler.profile
146def 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

Callers

nothing calls this directly

Calls 5

connectMethod · 0.45
executeMethod · 0.45
limitMethod · 0.45
selectMethod · 0.45
fetchmanyMethod · 0.45

Tested by

no test coverage detected