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

Method SendBatch

pgxpool/pool.go:784–792  ·  view source on GitHub ↗
(ctx context.Context, b *pgx.Batch)

Source from the content-addressed store, hash-verified

782}
783
784func (p *Pool) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults {
785 c, err := p.Acquire(ctx)
786 if err != nil {
787 return errBatchResults{err: err}
788 }
789
790 br := c.SendBatch(ctx, b)
791 return &poolBatchResults{br: br, c: c}
792}
793
794// Begin acquires a connection from the [Pool] and starts a transaction. Unlike [database/sql], the context only affects the begin command. i.e. there is no
795// auto-rollback on context cancellation. Begin initiates a transaction block without explicitly setting a transaction mode for the block (see [Pool.BeginTx] with [pgx.TxOptions] if transaction mode is required).

Callers

nothing calls this directly

Calls 2

AcquireMethod · 0.95
SendBatchMethod · 0.65

Tested by

no test coverage detected