MCPcopy
hub / github.com/psycopg/psycopg / fetchall

Method fetchall

psycopg/psycopg/cursor.py:274–284  ·  view source on GitHub ↗

Return all the remaining records from the current result set. :rtype: Sequence[Row], with Row defined by `row_factory`

(self)

Source from the content-addressed store, hash-verified

272 return records
273
274 def fetchall(self) -> list[Row]:
275 """
276 Return all the remaining records from the current result set.
277
278 :rtype: Sequence[Row], with Row defined by `row_factory`
279 """
280 self._fetch_pipeline()
281 res = self._check_result_for_fetch()
282 records = self._tx.load_rows(self._pos, res.ntuples, self._make_row)
283 self._pos = res.ntuples
284 return records
285
286 def __iter__(self) -> Self:
287 return self

Callers 15

test_context_commitFunction · 0.45
test_context_rollbackFunction · 0.45
test_row_factoryFunction · 0.45
test_copy_in_buffersFunction · 0.45
test_copy_in_strFunction · 0.45
test_copy_in_recordsFunction · 0.45
test_copy_in_text_pinnedFunction · 0.45
test_copy_in_allcharsFunction · 0.45

Calls 3

_fetch_pipelineMethod · 0.95
load_rowsMethod · 0.45

Tested by 15

test_context_commitFunction · 0.36
test_context_rollbackFunction · 0.36
test_row_factoryFunction · 0.36
test_copy_in_buffersFunction · 0.36
test_copy_in_strFunction · 0.36
test_copy_in_recordsFunction · 0.36
test_copy_in_text_pinnedFunction · 0.36
test_copy_in_allcharsFunction · 0.36