Closed poneding closed 3 years ago
@med1tator I run cmd: go get -u gorm.io/driver/sqlserver and have the problem as below
../../../../../gorm.io/driver/sqlserver/sqlserver.go:176:35: cannot use 0 (type untyped int) as type string ../../../../../gorm.io/driver/sqlserver/sqlserver.go:177:10: cannot use dialector.Config.DefaultStringSize (type string) as type int in assignment
DefaultStringSize in struct is string, but assign as integer type Config struct { DriverName string DSN string DefaultStringSize string Conn gorm.ConnPool }
..... if dialector.DefaultStringSize > 0 { size = dialector.DefaultStringSize } else { size = 256 }
@med1tator I run cmd: go get -u gorm.io/driver/sqlserver and have the problem as below
../../../../../gorm.io/driver/sqlserver/sqlserver.go:176:35: cannot use 0 (type untyped int) as type string ../../../../../gorm.io/driver/sqlserver/sqlserver.go:177:10: cannot use dialector.Config.DefaultStringSize (type string) as type int in assignment
DefaultStringSize in struct is string, but assign as integer type Config struct { DriverName string DSN string DefaultStringSize string Conn gorm.ConnPool }
..... if dialector.DefaultStringSize > 0 { size = dialector.DefaultStringSize } else { size = 256 }
my bad, sorry. i have created an new pull request to fix it.
Add sqlserver config options: DefaultStringSize.
for example: