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

Method Read

pgconn/pgconn_test.go:4501–4509  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

4499}
4500
4501func (c *prefixConn) Read(b []byte) (n int, err error) {
4502 if !c.prefixConsumed && len(c.prefixData) > 0 {
4503 n = copy(b, c.prefixData)
4504 c.prefixData = c.prefixData[n:]
4505 c.prefixConsumed = len(c.prefixData) == 0
4506 return n, nil
4507 }
4508 return c.Conn.Read(b)
4509}
4510
4511// https://github.com/jackc/pgx/issues/1920
4512func TestFatalErrorReceivedInPipelineMode(t *testing.T) {

Calls

no outgoing calls

Tested by

no test coverage detected