Documentation
¶
Index ¶
- Variables
- func MapDBMLType(name string) schema.Type
- func MapGoType(driver schema.DatabaseDriver, typ schema.Type) golang.Type
- func MapMySQLType(name string) schema.Type
- func MapPGType(name string) schema.Type
- func TransitSQLType(source, target schema.DatabaseDriver, dataType schema.Type) (schema.Type, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DBMLChar = schema.Type{Name: "char", IsStringable: true} DBMLVarchar = schema.Type{Name: "varchar", IsStringable: true} DBMLBinary = schema.Type{Name: "binary", IsBinary: true} DBMLText = schema.Type{Name: "text", IsStringable: true} DBMLInt = schema.Type{Name: "int", IsInteger: true, IsNumeric: true} DBMLInteger = schema.Type{Name: "integer", IsInteger: true, IsNumeric: true} DBMLTimestamp = schema.Type{Name: "timestamp", IsDatetime: true} DBMLUUID = schema.Type{Name: "uuid", IsUUID: true, IsStringable: true} DBMLFloat = schema.Type{Name: "float", IsFloat: true, IsNumeric: true} DBMLFloat8 = schema.Type{Name: "float8", IsFloat: true, IsNumeric: true} DBMLBoolean = schema.Type{Name: "boolean", IsBoolean: true} DBMLBool = schema.Type{Name: "bool", IsBoolean: true} )
View Source
var ( MySQLChar = schema.Type{Name: "char", IsStringable: true} MySQLVarchar = schema.Type{Name: "varchar", Length: "256", IsStringable: true} MySQLBinary = schema.Type{Name: "binary"} MySQLText = schema.Type{Name: "text", IsStringable: true} MySQLLongText = schema.Type{Name: "longtext", IsStringable: true} MySQLInt = schema.Type{Name: "int", IsInteger: true, IsNumeric: true} MySQLInteger = schema.Type{Name: "integer", IsInteger: true, IsNumeric: true} MySQLSmallInt = schema.Type{Name: "smallint", IsInteger: true, IsNumeric: true} MySQLBigInt = schema.Type{Name: "bigint", IsInteger: true, IsNumeric: true} MySQLTinyint = schema.Type{Name: "tinyint", IsInteger: true, IsNumeric: true} MySQLMediumint = schema.Type{Name: "mediumint", IsInteger: true, IsNumeric: true} MySQLFloat = schema.Type{Name: "float", IsFloat: true, IsNumeric: true} MySQLDouble = schema.Type{Name: "double", IsFloat: true, IsNumeric: true} MySQLDecimal = schema.Type{Name: "decimal", IsFloat: true, IsNumeric: true} MySQLBit = schema.Type{Name: "bit"} MySQLTimestamp = schema.Type{Name: "timestamp"} MySQLDate = schema.Type{Name: "date", IsDate: true} MySQLTime = schema.Type{Name: "time"} MySQLDateTime = schema.Type{Name: "datetime", IsDatetime: true} MySQLLongBlob = schema.Type{Name: "longblob"} MySQLLineString = schema.Type{Name: "linestring"} MySQLPolygon = schema.Type{Name: "polygon"} MySQLPseudoUUID = MySQLVarchar.WithLength("36") )
View Source
var ( PGText = schema.Type{Name: "text", IsStringable: false} PGUUID = schema.Type{Name: "uuid", IsStringable: true, IsUUID: true} PGCharacter = schema.Type{Name: "character", IsStringable: true} PGChar = schema.Type{Name: "char", IsStringable: true} PGCharacterVarying = schema.Type{Name: "character varying", IsStringable: true} PGBpchar = schema.Type{Name: "bpchar", IsStringable: true} PGTimestampWithoutTZ = schema.Type{Name: "timestamp without time zone", IsDatetime: true} PGTimestampWithTZ = schema.Type{Name: "timestamp with time zone", IsDatetime: true} PGTimeWithoutTZ = schema.Type{Name: "time without time zone", IsDatetime: true} PGTimeWithTZ = schema.Type{Name: "time with time zone", IsDatetime: true} PGDate = schema.Type{Name: "date", IsDate: true} PGInterval = schema.Type{Name: "interval", IsInterval: true} PGBoolean = schema.Type{Name: "boolean", IsBoolean: true} PGBit = schema.Type{Name: "bit"} PGBytea = schema.Type{Name: "bytea"} PGInteger = schema.Type{Name: "integer", IsInteger: true, IsNumeric: true} PGBigint = schema.Type{Name: "bigint", IsInteger: true, IsNumeric: true} PGInt = schema.Type{Name: "int", IsInteger: true, IsNumeric: true} PGInt4 = schema.Type{Name: "int4", IsInteger: true, IsNumeric: true} PGInt8 = schema.Type{Name: "int8", IsInteger: true, IsNumeric: true} PGSmallInt = schema.Type{Name: "smallint", IsInteger: true, IsNumeric: true} PGSmallSerial = schema.Type{Name: "smallserial", IsInteger: true, IsNumeric: true} PGSerial = schema.Type{Name: "serial", IsInteger: true, IsNumeric: true} PGBigSerial = schema.Type{Name: "bigserial", IsInteger: true, IsNumeric: true} PGMoney = schema.Type{Name: "money"} PGNumeric = schema.Type{Name: "numeric", IsNumeric: true} PGReal = schema.Type{Name: "real", IsFloat: true, IsNumeric: true} PGDoublePrecision = schema.Type{Name: "double precision", IsFloat: true, IsNumeric: true} PGFloat8 = schema.Type{Name: "float8", IsFloat: true, IsNumeric: true} PGDecimal = schema.Type{Name: "decimal", IsFloat: true, IsNumeric: true} PGCidr = schema.Type{Name: "cidr"} PGInet = schema.Type{Name: "inet"} PGMacaddr = schema.Type{Name: "macaddr"} PGXML = schema.Type{Name: "xml"} PGJSON = schema.Type{Name: "json", IsJSON: true} PGJSONB = schema.Type{Name: "jsonb", IsJSON: true} PGTSVector = schema.Type{Name: "tsvector"} PGTSQuery = schema.Type{Name: "tsquery"} PGArray = schema.Type{Name: "array"} PGPoint = schema.Type{Name: "point"} PGLine = schema.Type{Name: "line"} PGLseg = schema.Type{Name: "lseg"} PGBox = schema.Type{Name: "box"} PGPath = schema.Type{Name: "path"} PGPolygon = schema.Type{Name: "polygon"} PGCircle = schema.Type{Name: "circle"} PGTxidSnapshot = schema.Type{Name: "txid_snapshot"} )
Functions ¶
func MapDBMLType ¶
func MapMySQLType ¶ added in v0.5.0
func TransitSQLType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.