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

Method ReadAll

pgconn/pgconn.go:1584–1593  ·  view source on GitHub ↗

ReadAll reads all available results. Calling ReadAll is mutually exclusive with all other MultiResultReader methods.

()

Source from the content-addressed store, hash-verified

1582
1583// ReadAll reads all available results. Calling ReadAll is mutually exclusive with all other MultiResultReader methods.
1584func (mrr *MultiResultReader) ReadAll() ([]*Result, error) {
1585 var results []*Result
1586
1587 for mrr.NextResult() {
1588 results = append(results, mrr.ResultReader().Read())
1589 }
1590 err := mrr.Close()
1591
1592 return results, err
1593}
1594
1595func (mrr *MultiResultReader) receiveMessage() (pgproto3.BackendMessage, error) {
1596 msg, err := mrr.pgConn.receiveMessage()

Callers 15

DeallocateAllMethod · 0.80
TestScriptFunction · 0.80
TestConnExecFunction · 0.80
TestConnExecEmptyFunction · 0.80
TestConnExecBatchFunction · 0.80

Calls 4

NextResultMethod · 0.95
ResultReaderMethod · 0.95
CloseMethod · 0.95
ReadMethod · 0.45

Tested by 15

TestScriptFunction · 0.64
TestConnExecFunction · 0.64
TestConnExecEmptyFunction · 0.64
TestConnExecBatchFunction · 0.64