func (r *rows) ColumnTypeDatabaseTypeName(index int) string {
	return r.columnDefs.Columns[index].DataTypeName
}
Returns the database system type name without the length. Type names should be uppercase.
Interface: driver.RowsColumnTypeDatabaseTypeName
package vertigo
import (
	"context"
	"database/sql"
	"database/sql/driver"
	"encoding/hex"
	"fmt"
	"io"
	"reflect"
	"regexp"
	"strconv"
	"strings"
	"time"
	"github.com/vertica/vertica-sql-go/common"
	"github.com/vertica/vertica-sql-go/logger"
	"github.com/vertica/vertica-sql-go/msgs"
	"github.com/vertica/vertica-sql-go/rowcache"
)
type rowStore interface {
	AddRow(msg *msgs.BEDataRowMsg)
	GetRow() *msgs.BEDataRowMsg
	Peek() *msgs.BEDataRowMsg
	Close() error
	Finalize() error
}
type rows struct {
	columnDefs *msgs.BERowDescMsg
	resultData rowStore
	tzOffset      string
	inMemRowLimit int
}
var (
	paddingString        = "000000"
	defaultRowBufferSize = 256
	rowLogger            = logger.New("row")
)
func (r *rows) Columns() []string {
	columnLabels := make([]string, len(r.columnDefs.Columns))
	for idx, cd := range r.columnDefs.Columns {
		columnLabels[idx] = cd.FieldName
	}
	return columnLabels
}
func (r *rows) Close() error {
	return r.resultData.Close()
}
func (r *rows) Next(dest []driver.Value) error {
	var err error
	nextRow := r.resultData.GetRow()
	if nextRow == nil {
		return io.EOF
	}
	rowCols := nextRow.Columns()
	for idx := uint16(0); idx < rowCols.NumCols; idx++ {
		colVal := rowCols.Chunk()
		if colVal == nil {
			dest[idx] = nil
			continue
		}
		switch r.columnDefs.Columns[idx].DataTypeOID {
		case common.ColTypeBoolean:  
			dest[idx] = colVal[0] == 't'
		case common.ColTypeInt64:  
			dest[idx], err = strconv.Atoi(string(colVal))
		case common.ColTypeVarChar, common.ColTypeLongVarChar, common.ColTypeChar, common.ColTypeUUID:  
			dest[idx] = string(colVal)
		case common.ColTypeFloat64, common.ColTypeNumeric:  
			dest[idx], err = strconv.ParseFloat(string(colVal), 64)
		case common.ColTypeDate:  
			dest[idx], err = parseDateColumn(string(colVal))
		case common.ColTypeTimestamp:  
			dest[idx], err = parseTimestampTZColumn(string(colVal) + r.tzOffset)
		case common.ColTypeTimestampTZ:
			dest[idx], err = parseTimestampTZColumn(string(colVal))
		case common.ColTypeTime:  
			dest[idx], err = parseTimestampTZColumn("0000-01-01 " + string(colVal) + r.tzOffset)
		case common.ColTypeTimeTZ:
			dest[idx], err = parseTimestampTZColumn("0000-01-01 " + string(colVal))
		case common.ColTypeInterval, common.ColTypeIntervalYM:  
			dest[idx] = string(colVal)
		case common.ColTypeVarBinary, common.ColTypeLongVarBinary, common.ColTypeBinary:  
			dest[idx] = hex.EncodeToString(colVal)
		default:
			dest[idx] = string(colVal)
		}
		if err != nil {
			rowLogger.Error("%s", err.Error())
		}
	}
	return err
}
func parseDateColumn(fullString string) (driver.Value, error) {
	var result driver.Value
	var err error
	if strings.HasSuffix(fullString, " BC") {
		var t time.Time
		t, err = time.Parse("2006-01-02 BC", fullString)
		if err != nil {
			return time.Time{}, err
		}
		result = t.AddDate(-2*t.Year(), 0, 0)
	} else {
		result, err = time.Parse("2006-01-02", fullString)
	}
	return result, err
}
func parseTimestampTZColumn(fullString string) (driver.Value, error) {
	var result driver.Value
	var err error
	var isBC bool
	if strings.Contains(fullString, "infinity") {
		return time.Time{}, fmt.Errorf("cannot parse an infinity timestamp to time.Time")
	}
	if isBC = strings.Contains(fullString, " BC"); isBC {
		fullString = strings.Replace(fullString, " BC", "", -1)
	}
	endsWithHalfHour, _ := regexp.Compile(".*:\\d{2}$")
	if !endsWithHalfHour.MatchString(fullString) {
		fullString = fullString + ":00"
	}
	if strings.IndexByte(fullString, '.') == 19 {
		neededPadding := 32 - len(fullString)
		if neededPadding > 0 {
			fullString = fullString[0:26-neededPadding] + paddingString[0:neededPadding] + fullString[26-neededPadding:]
		}
	} else {
		fullString = fullString[0:19] + "." + paddingString[0:6] + fullString[19:]
	}
	result, err = time.Parse("2006-01-02 15:04:05.000000-07:00", fullString)
	if isBC {
		result = result.(time.Time).AddDate(-2*result.(time.Time).Year(), 0, 0)
	}
	return result, err
}
func (r *rows) finalize() {
	r.resultData.Finalize()
}
func (r *rows) addRow(rowData *msgs.BEDataRowMsg) {
	r.resultData.AddRow(rowData)
}
func newRows(ctx context.Context, columnsDefsMsg *msgs.BERowDescMsg, tzOffset string) *rows {
	rowBufferSize := defaultRowBufferSize
	inMemRowLimit := 0
	var resultData rowStore
	var err error
	if vCtx, ok := ctx.(VerticaContext); ok {
		rowBufferSize = vCtx.GetInMemoryResultRowLimit()
		inMemRowLimit = rowBufferSize
	}
	if inMemRowLimit != 0 {
		resultData, err = rowcache.NewFileCache(inMemRowLimit)
		if err != nil {
			resultData = rowcache.NewMemoryCache(rowBufferSize)
		}
	} else {
		resultData = rowcache.NewMemoryCache(rowBufferSize)
	}
	res := &rows{
		columnDefs:    columnsDefsMsg,
		resultData:    resultData,
		tzOffset:      tzOffset,
		inMemRowLimit: inMemRowLimit,
	}
	return res
}