Updated on 2024-05-07 GMT+08:00

type ColumnType

The following table describes type ColumnType.

Method

Description

Return Value

(ci *ColumnType)DatabaseTypeName()

Returns the name of the column-type database system. If an empty string is returned, driver-type names are not supported.

error

(ci *ColumnType)DecimalSize()

Returns the scale and precision of the decimal type.

If the value of ok is false, the specified type is unavailable or not supported.

precision, scale int64, ok boolean

(ci *ColumnType)Length()

Returns the length of the data column type. If the value of ok is false, the specified type does not have a length.

length int64, ok boolean

(ci *ColumnType)ScanType()

Returns a Go type that can be used for scanning by using Rows.Scan.

reflect.Type

(ci *ColumnType)Name()

Returns the name of a data column.

string