mirror of https://github.com/jackc/pgx.git
Fix pipelineBatchResults.Exec() not returning error from ResultReader
parent
09371981f9
commit
a23a423f55
4
batch.go
4
batch.go
|
@ -287,7 +287,7 @@ func (br *pipelineBatchResults) Exec() (pgconn.CommandTag, error) {
|
||||||
results, err := br.pipeline.GetResults()
|
results, err := br.pipeline.GetResults()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
br.err = err
|
br.err = err
|
||||||
return pgconn.CommandTag{}, err
|
return pgconn.CommandTag{}, br.err
|
||||||
}
|
}
|
||||||
var commandTag pgconn.CommandTag
|
var commandTag pgconn.CommandTag
|
||||||
switch results := results.(type) {
|
switch results := results.(type) {
|
||||||
|
@ -306,7 +306,7 @@ func (br *pipelineBatchResults) Exec() (pgconn.CommandTag, error) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return commandTag, err
|
return commandTag, br.err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Query reads the results from the next query in the batch as if the query has been sent with Query.
|
// Query reads the results from the next query in the batch as if the query has been sent with Query.
|
||||||
|
|
Loading…
Reference in New Issue