Add driver.RowsColumnTypeDatabaseTypeName support to stdlib.Rows
This commit is contained in:
@@ -71,6 +71,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/jackc/pgx"
|
||||
@@ -405,6 +406,10 @@ func (r *Rows) Columns() []string {
|
||||
return names
|
||||
}
|
||||
|
||||
func (r *Rows) ColumnTypeDatabaseTypeName(index int) string {
|
||||
return strings.ToUpper(r.rows.FieldDescriptions()[index].DataTypeName)
|
||||
}
|
||||
|
||||
func (r *Rows) Close() error {
|
||||
r.rows.Close()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user