-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
feat(spanner): support of uint datatype for gorm.Model #8935
base: main
Are you sure you want to change the base?
Conversation
@@ -3471,6 +3471,30 @@ func encodeValue(v interface{}) (*proto3.Value, *sppb.Type, error) { | |||
} | |||
} | |||
pt = listType(intType()) | |||
case uint: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shouldn't we add support for uint
type in decodeValue
method also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gorm.Model tests were able decode to uint without making any changes in decodeValue
function, seems like default
case is sufficient, let me add tests validating it
@rahul2393 do we still want this change? |
@rahul2393 see my comment above |
Golang ORM (GORM) customers use gorm.Model for declaring the models in application code, this PR will add support of
uint
type in Cloud Spanner client library since Cloud Spanner does not support uint datatype natively