2
0

Add driver.RowsColumnTypeDatabaseTypeName support to stdlib.Rows

This commit is contained in:
Jack Christensen
2017-05-19 16:05:30 -05:00
parent 5ee76a26c8
commit f9cb22e4b8
2 changed files with 32 additions and 0 deletions
+5
View File
@@ -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