add UniqueIdentifier type for supporting mssql (#38)
This commit is contained in:
parent
cb1d0ca71f
commit
c624c83eda
4
type.go
4
type.go
|
@ -78,6 +78,7 @@ var (
|
|||
MediumText = "MEDIUMTEXT"
|
||||
LongText = "LONGTEXT"
|
||||
Uuid = "UUID"
|
||||
UniqueIdentifier = "UNIQUEIDENTIFIER"
|
||||
|
||||
Date = "DATE"
|
||||
DateTime = "DATETIME"
|
||||
|
@ -153,6 +154,7 @@ var (
|
|||
MediumBlob: BLOB_TYPE,
|
||||
LongBlob: BLOB_TYPE,
|
||||
Bytea: BLOB_TYPE,
|
||||
UniqueIdentifier: BLOB_TYPE,
|
||||
|
||||
Bool: NUMERIC_TYPE,
|
||||
|
||||
|
@ -291,7 +293,7 @@ func SQLType2Type(st SQLType) reflect.Type {
|
|||
return reflect.TypeOf(float64(1))
|
||||
case Char, Varchar, NVarchar, TinyText, Text, MediumText, LongText, Enum, Set, Uuid, Clob:
|
||||
return reflect.TypeOf("")
|
||||
case TinyBlob, Blob, LongBlob, Bytea, Binary, MediumBlob, VarBinary:
|
||||
case TinyBlob, Blob, LongBlob, Bytea, Binary, MediumBlob, VarBinary, UniqueIdentifier:
|
||||
return reflect.TypeOf([]byte{})
|
||||
case Bool:
|
||||
return reflect.TypeOf(true)
|
||||
|
|
Loading…
Reference in New Issue