We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlserver/sqlserver.go
Line 158 in 3c16210
SQL Server datatype selection based on int value data size is not appropriate. Here is the condition
switch { case field.Size < 16: sqlType = "smallint" case field.Size < 31: sqlType = "int" default: sqlType = "bigint" }
Golang integers
int8 : 1 byte or 8 bits
int16: 2 bytes or 16 bits
int32: 3 bytes or 32 bits
int64
SQL Server integers equivalent
tinyint : int8
smallint : int16
int : int32
biging : int64
The condition should be
switch { case field.Size < 16: sqlType = "tinyint" case field.Size < 31: sqlType = "smallint" case field.Size < 64: sqlType = "int" default: sqlType = "bigint" }
The text was updated successfully, but these errors were encountered:
I have created a pull request #53
Sorry, something went wrong.
No branches or pull requests
sqlserver/sqlserver.go
Line 158 in 3c16210
SQL Server datatype selection based on int value data size is not appropriate. Here is the condition
Golang integers
int8 : 1 byte or 8 bits
int16: 2 bytes or 16 bits
int32: 3 bytes or 32 bits
int64
4 bytes or 64 bits`SQL Server integers equivalent
tinyint : int8
smallint : int16
int : int32
biging : int64
The condition should be
The text was updated successfully, but these errors were encountered: