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
+8
View File
@@ -55,6 +55,10 @@ type Rows interface {
// RawValues returns the unparsed bytes of the row values. The returned data is only valid until the next Next
// call or the Rows is closed.
RawValues() [][]byte
// Conn returns the underlying *Conn on which the query was executed. This may return nil if Rows did not come from a
// *Conn (e.g. if it was created by RowsFromResultReader)
Conn() *Conn
}
// Row is a convenience wrapper over Rows that is returned by QueryRow.
@@ -310,6 +314,10 @@ func (rows *baseRows) RawValues() [][]byte {
return rows.values
}
func (rows *baseRows) Conn() *Conn {
return rows.conn
}
type ScanArgError struct {
ColumnIndex int
Err error