Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rahul2393
Copy link
Contributor

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

@rahul2393 rahul2393 requested review from a team as code owners October 30, 2023 14:34
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Oct 30, 2023
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Oct 30, 2023
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 30, 2023
@@ -3471,6 +3471,30 @@ func encodeValue(v interface{}) (*proto3.Value, *sppb.Type, error) {
}
}
pt = listType(intType())
case uint:
Copy link
Contributor

@harshachinta harshachinta Oct 30, 2023

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

@rahul2393 rahul2393 Oct 31, 2023

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

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 30, 2023
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 20, 2023
@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Nov 30, 2023
@product-auto-label product-auto-label bot added stale: extraold Pull request is critically old and needs prioritization. and removed stale: old Pull request is old and needs attention. labels Dec 30, 2023
@codyoss
Copy link
Member

codyoss commented Jul 24, 2024

@rahul2393 do we still want this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. kokoro:force-run Add this label to force Kokoro to re-run the tests. size: s Pull request size is small. stale: extraold Pull request is critically old and needs prioritization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants