MCPcopy
hub / github.com/psycopg/psycopg / write_row

Method write_row

psycopg/psycopg/_copy.py:126–129  ·  view source on GitHub ↗

Write a record to a table after a :sql:`COPY FROM` operation.

(self, row: Sequence[Any])

Source from the content-addressed store, hash-verified

124 self._write(data)
125
126 def write_row(self, row: Sequence[Any]) -> None:
127 """Write a record to a table after a :sql:`COPY FROM` operation."""
128 if data := self.formatter.write_row(row):
129 self._write(data)
130
131 def finish(self, exc: BaseException | None) -> None:
132 """Terminate the copy operation and free the resources allocated.

Callers 15

test_set_typesFunction · 0.45
test_rowlen_mismatchFunction · 0.45
test_subclass_adapterFunction · 0.45
test_copy_in_recordsFunction · 0.45
test_copy_in_text_pinnedFunction · 0.45
test_copy_in_allcharsFunction · 0.45
test_copy_in_formatFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_set_typesFunction · 0.36
test_rowlen_mismatchFunction · 0.36
test_subclass_adapterFunction · 0.36
test_copy_in_recordsFunction · 0.36
test_copy_in_text_pinnedFunction · 0.36
test_copy_in_allcharsFunction · 0.36
test_copy_in_formatFunction · 0.36