MCPcopy
hub / github.com/jackc/pgx / CopyFromSource

Interface CopyFromSource

copy_from.go:95–107  ·  copy_from.go::CopyFromSource

CopyFromSource is the interface used by [Conn.CopyFrom] as the source for copy data.

Source from the content-addressed store, hash-verified

93
94// CopyFromSource is the interface used by [Conn.CopyFrom] as the source for copy data.
95type CopyFromSource interface {
96 // Next returns true if there is another row and makes the next row data
97 // available to Values(). When there are no more rows available or an error
98 // has occurred it returns false.
99 Next() bool
100
101 // Values returns the values for the current row.
102 Values() ([]any, error)
103
104 // Err returns any error that has been encountered by the CopyFromSource. If
105 // this is not nil *Conn.CopyFrom will abort the copy.
106 Err() error
107}
108
109type copyFrom struct {
110 conn *Conn

Callers 3

buildCopyBufMethod · 0.65
buildCopyBufMethod · 0.65
runMethod · 0.65

Implementers 11

baseRowsrows.go
copyFromRowscopy_from.go
copyFromSlicecopy_from.go
copyFromFunccopy_from.go
clientFailSourcecopy_from_test.go
failSourcecopy_from_test.go
slowFailRaceSourcecopy_from_test.go
clientFinalErrSourcecopy_from_test.go
errRowspgxpool/rows.go
poolRowspgxpool/rows.go

Calls

no outgoing calls

Tested by

no test coverage detected