()
| 439 | } |
| 440 | |
| 441 | func (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 | |
| 455 | type emptyBatchResults struct { |
| 456 | conn *Conn |