2
0

Add Conn to Rows interface

https://github.com/jackc/pgx/issues/1191
This commit is contained in:
Jack Christensen
2022-07-16 17:56:24 -05:00
parent 29254180ca
commit b6f5cbd15e
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -18,6 +18,7 @@ func (errRows) Next() bool { return false }
func (e errRows) Scan(dest ...any) error { return e.err }
func (e errRows) Values() ([]any, error) { return nil, e.err }
func (e errRows) RawValues() [][]byte { return nil }
func (e errRows) Conn() *pgx.Conn { return nil }
type errRow struct {
err error
@@ -86,6 +87,10 @@ func (rows *poolRows) RawValues() [][]byte {
return rows.r.RawValues()
}
func (rows *poolRows) Conn() *pgx.Conn {
return rows.r.Conn()
}
type poolRow struct {
r pgx.Row
c *Conn