Add pgconn.CheckConn
This commit is contained in:
+10
-1
@@ -13,6 +13,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/internal/nbconn"
|
||||
"github.com/jackc/pgx/v5/pgconn"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -1236,7 +1237,7 @@ func BenchmarkSelectRowsPgConnExecPrepared(b *testing.B) {
|
||||
}
|
||||
|
||||
type queryRecorder struct {
|
||||
conn net.Conn
|
||||
conn nbconn.Conn
|
||||
writeBuf []byte
|
||||
readCount int
|
||||
}
|
||||
@@ -1252,6 +1253,14 @@ func (qr *queryRecorder) Write(b []byte) (n int, err error) {
|
||||
return qr.conn.Write(b)
|
||||
}
|
||||
|
||||
func (qr *queryRecorder) BufferReadUntilBlock() error {
|
||||
return qr.conn.BufferReadUntilBlock()
|
||||
}
|
||||
|
||||
func (qr *queryRecorder) Flush() error {
|
||||
return qr.conn.Flush()
|
||||
}
|
||||
|
||||
func (qr *queryRecorder) Close() error {
|
||||
return qr.conn.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user