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

Method CopyFrom

pgxpool/pool.go:821–829  ·  view source on GitHub ↗
(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)

Source from the content-addressed store, hash-verified

819}
820
821func (p *Pool) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) {
822 c, err := p.Acquire(ctx)
823 if err != nil {
824 return 0, err
825 }
826 defer c.Release()
827
828 return c.Conn().CopyFrom(ctx, tableName, columnNames, rowSrc)
829}
830
831// Ping acquires a connection from the [Pool] and executes an empty sql statement against it.
832// If the sql returns without error, the database [Pool.Ping] is considered successful, otherwise, the error is returned.

Callers

nothing calls this directly

Calls 4

AcquireMethod · 0.95
ReleaseMethod · 0.80
CopyFromMethod · 0.65
ConnMethod · 0.65

Tested by

no test coverage detected