Documentation ¶
Overview ¶
Package types provides database types.
Index ¶
- Variables
- type Column
- func NewAlphanum(length int64) Column
- func NewBinary(length int64) Column
- func NewChar(length int64) Column
- func NewDecimal(precision, scale int64) Column
- func NewNChar(length int64) Column
- func NewNVarchar(length int64) Column
- func NewNullAlphanum(length int64) Column
- func NewNullBinary(length int64) Column
- func NewNullChar(length int64) Column
- func NewNullDecimal(precision, scale int64) Column
- func NewNullNChar(length int64) Column
- func NewNullNVarchar(length int64) Column
- func NewNullSTGeometry(srid int32) Column
- func NewNullSTPoint(srid int32) Column
- func NewNullShorttext(length int64) Column
- func NewNullSmalldecimal(precision, scale int64) Column
- func NewNullVarbinary(length int64) Column
- func NewNullVarchar(length int64) Column
- func NewSTGeometry(srid int32) Column
- func NewSTPoint(srid int32) Column
- func NewShorttext(length int64) Column
- func NewSmalldecimal(precision, scale int64) Column
- func NewVarbinary(length int64) Column
- func NewVarchar(length int64) Column
- type Spatial
Constants ¶
This section is empty.
Variables ¶
var ( Tinyint = &basicColumn{dt: _tinyint, nullable: false} Smallint = &basicColumn{dt: _smallint, nullable: false} Integer = &basicColumn{dt: _integer, nullable: false} Bigint = &basicColumn{dt: _bigint, nullable: false} Real = &basicColumn{dt: _real, nullable: false} Double = &basicColumn{dt: _double, nullable: false} Date = &basicColumn{dt: _date, nullable: false} Time = &basicColumn{dt: _time, nullable: false} Timestamp = &basicColumn{dt: _timestamp, nullable: false} Longdate = &basicColumn{dt: _longdate, nullable: false} Seconddate = &basicColumn{dt: _seconddate, nullable: false} Daydate = &basicColumn{dt: _daydate, nullable: false} Secondtime = &basicColumn{dt: _secondtime, nullable: false} Clob = &basicColumn{dt: _clob, nullable: false} NClob = &basicColumn{dt: _nclob, nullable: false} Blob = &basicColumn{dt: _blob, nullable: false} Text = &basicColumn{dt: _text, nullable: false} Bintext = &basicColumn{dt: _bintext, nullable: false} Boolean = &basicColumn{dt: _boolean, nullable: false} )
Basic column types.
var ( NullTinyint = &basicColumn{dt: _tinyint, nullable: true} NullSmallint = &basicColumn{dt: _smallint, nullable: true} NullInteger = &basicColumn{dt: _integer, nullable: true} NullBigint = &basicColumn{dt: _bigint, nullable: true} NullReal = &basicColumn{dt: _real, nullable: true} NullDouble = &basicColumn{dt: _double, nullable: true} NullDate = &basicColumn{dt: _date, nullable: true} NullTime = &basicColumn{dt: _time, nullable: true} NullTimestamp = &basicColumn{dt: _timestamp, nullable: true} NullLongdate = &basicColumn{dt: _longdate, nullable: true} NullSeconddate = &basicColumn{dt: _seconddate, nullable: true} NullDaydate = &basicColumn{dt: _daydate, nullable: true} NullSecondtime = &basicColumn{dt: _secondtime, nullable: true} NullClob = &basicColumn{dt: _clob, nullable: true} NullNClob = &basicColumn{dt: _nclob, nullable: true} NullBlob = &basicColumn{dt: _blob, nullable: true} NullText = &basicColumn{dt: _text, nullable: true} NullBintext = &basicColumn{dt: _bintext, nullable: true} NullBoolean = &basicColumn{dt: _boolean, nullable: true} )
Basic nullable column types.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column interface { IsSupported(version, dfv int) bool TypeName() string DatabaseTypeName(version, dfv int) string DataType() string Length() (length int64, ok bool) PrecisionScale() (precision, scale int64, ok bool) ScanType(version, dfv int) reflect.Type Nullable() (nullable, ok bool) }
Column represents a database column.
func NewDecimal ¶
NewDecimal return a new decimal column.
func NewNullAlphanum ¶
NewNullAlphanum return a new nullable alphanum column.
func NewNullBinary ¶
NewNullBinary return a new nullable binary column.
func NewNullChar ¶
NewNullChar return a new nullable char column.
func NewNullDecimal ¶
NewNullDecimal return a new nullable decimal column.
func NewNullNChar ¶
NewNullNChar return a new nullable nchar column.
func NewNullNVarchar ¶
NewNullNVarchar return a new nullable nvarchar column.
func NewNullSTGeometry ¶
NewNullSTGeometry return a new nullable stgeometry column.
func NewNullSTPoint ¶
NewNullSTPoint return a new nullable stpoint column.
func NewNullShorttext ¶
NewNullShorttext return a new nullable shorttext column.
func NewNullSmalldecimal ¶
NewNullSmalldecimal return a new nullable smalldecimal column.
func NewNullVarbinary ¶
NewNullVarbinary return a new nullable varbinary column.
func NewNullVarchar ¶
NewNullVarchar return a new nullable varchar column.
func NewSTGeometry ¶
NewSTGeometry return a new stgeometry column.
func NewShorttext ¶
NewShorttext return a new shortext column.
func NewSmalldecimal ¶
NewSmalldecimal return a new smalldecimal column.
func NewVarbinary ¶
NewVarbinary return a new varbinary column.