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

Method nextQueryAndArgs

batch.go:441–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439}
440
441func (br *pipelineBatchResults) nextQueryAndArgs() (query string, args []any, err error) {
442 if br.b == nil {
443 return "", nil, errors.New("no reference to batch")
444 }
445
446 if br.qqIdx >= len(br.b.QueuedQueries) {
447 return "", nil, errors.New("no more results in batch")
448 }
449
450 bi := br.b.QueuedQueries[br.qqIdx]
451 br.qqIdx++
452 return bi.SQL, bi.Arguments, nil
453}
454
455type emptyBatchResults struct {
456 conn *Conn

Callers 2

ExecMethod · 0.95
QueryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected