GetResults gets the next results. If results are present, results may be a *ResultReader, *StatementDescription, or *PipelineSync. If an ErrorResponse is received from the server, results will be nil and err will be a *PgError. If no results are available, results and err will both be nil.
()
| 2584 | // *PipelineSync. If an ErrorResponse is received from the server, results will be nil and err will be a *PgError. If no |
| 2585 | // results are available, results and err will both be nil. |
| 2586 | func (p *Pipeline) GetResults() (results any, err error) { |
| 2587 | if p.closed { |
| 2588 | if p.err != nil { |
| 2589 | return nil, p.err |
| 2590 | } |
| 2591 | return nil, errors.New("pipeline closed") |
| 2592 | } |
| 2593 | |
| 2594 | return p.getResults() |
| 2595 | } |
| 2596 | |
| 2597 | func (p *Pipeline) getResults() (results any, err error) { |
| 2598 | if !p.conn.resultReader.closed { |