MCPcopy
hub / github.com/psycopg/psycopg / rows

Method rows

psycopg/psycopg/_copy.py:95–103  ·  view source on GitHub ↗

Iterate on the result of a :sql:`COPY TO` operation record by record. Note that the records returned will be tuples of unparsed strings or bytes, unless data types are specified using `set_types()`.

(self)

Source from the content-addressed store, hash-verified

93 return self.connection.wait(self._read_gen())
94
95 def rows(self) -> Iterator[tuple[Any, ...]]:
96 """
97 Iterate on the result of a :sql:`COPY TO` operation record by record.
98
99 Note that the records returned will be tuples of unparsed strings or
100 bytes, unless data types are specified using `set_types()`.
101 """
102 while (record := self.read_row()) is not None:
103 yield record
104
105 def read_row(self) -> tuple[Any, ...] | None:
106 """

Callers 15

test_copy_out_paramFunction · 0.45
test_rowsFunction · 0.45
test_set_custom_typeFunction · 0.45
test_rows_notypesFunction · 0.45
test_descriptionFunction · 0.45
workFunction · 0.45
test_copy_table_acrossFunction · 0.45
test_copy_out_paramFunction · 0.45
test_rowsFunction · 0.45
test_set_custom_typeFunction · 0.45
test_rows_notypesFunction · 0.45
test_descriptionFunction · 0.45

Calls 1

read_rowMethod · 0.95

Tested by 15

test_copy_out_paramFunction · 0.36
test_rowsFunction · 0.36
test_set_custom_typeFunction · 0.36
test_rows_notypesFunction · 0.36
test_descriptionFunction · 0.36
workFunction · 0.36
test_copy_table_acrossFunction · 0.36
test_copy_out_paramFunction · 0.36
test_rowsFunction · 0.36
test_set_custom_typeFunction · 0.36
test_rows_notypesFunction · 0.36
test_descriptionFunction · 0.36