internal/protocol/typecode.go
func (k TypeCode) DataType() DataType {
	switch k {
	default:
		return DtUnknown
	case tcTinyint:
		return DtTinyint
	case tcSmallint:
		return DtSmallint
	case tcInteger:
		return DtInteger
	case tcBigint:
		return DtBigint
	case tcReal:
		return DtReal
	case tcDouble:
		return DtDouble
	case tcDate, tcTime, tcTimestamp, tcLongdate, tcSeconddate, tcDaydate, tcSecondtime:
		return DtTime
	case tcDecimal:
		return DtDecimal
	case tcChar, tcVarchar, tcString, tcNchar, tcNvarchar, tcNstring:
		return DtString
	case tcBinary, tcVarbinary:
		return DtBytes
	case tcBlob, tcClob, tcNclob:
		return DtLob
	}
}
func (k TypeCode) DataType() DataType {
	switch k {
	default:
		return DtUnknown
	case tcTinyint:
		return DtTinyint
	case tcSmallint:
		return DtSmallint
	case tcInteger:
		return DtInteger
	case tcBigint:
		return DtBigint
	case tcReal:
		return DtReal
	case tcDouble:
		return DtDouble
	case tcDate, tcTime, tcTimestamp, tcLongdate, tcSeconddate, tcDaydate, tcSecondtime:
		return DtTime
	case tcDecimal:
		return DtDecimal
	case tcChar, tcVarchar, tcString, tcNchar, tcNvarchar, tcNstring:
		return DtString
	case tcBinary, tcVarbinary:
		return DtBytes
	case tcBlob, tcClob, tcNclob:
		return DtLob
	}
}
func ( k TypeCode ) DataType ( ) DataType { switch k { default : return DtUnknown case tcTinyint : return DtTinyint case tcSmallint : return DtSmallint case tcInteger : return DtInteger case tcBigint : return DtBigint case tcReal : return DtReal case tcDouble : return DtDouble case tcDate , tcTime , tcTimestamp , tcLongdate , tcSeconddate , tcDaydate , tcSecondtime : return DtTime case tcDecimal : return DtDecimal case tcChar , tcVarchar , tcString , tcNchar , tcNvarchar , tcNstring : return DtString case tcBinary , tcVarbinary : return DtBytes case tcBlob , tcClob , tcNclob : return DtLob } }
// DataType converts a type code into one of the supported data types by the driver.
DataType converts a type code into one of the supported data types by the driver .