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

Support row parsing for PROTO & ENUM column Types #333

Open
henriquegmendes opened this issue Dec 30, 2024 · 0 comments
Open

Support row parsing for PROTO & ENUM column Types #333

henriquegmendes opened this issue Dec 30, 2024 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@henriquegmendes
Copy link

henriquegmendes commented Dec 30, 2024

Is your feature request related to a problem? Please describe.
Spanner supports proto ENUM types when creating a table schema. However, this library doesn't allow parsing a queried row back into the proto enum type. Same happens with a raw proto type, which is also allowed by Spanner database.

Ex: when attempting to query a row that has an ENUM typed column, this library returns the following error: unsupported element type ENUM

Error happens right here: https://github.com/googleapis/go-sql-spanner/blob/main/rows.go#L273 --- The switch case doesn't include TypeCode_PROTO & TypeCode_ENUM types currently available on spanner library, so the above mentioned error gets triggered

Describe the solution you'd like
Add support to TypeCode_PROTO & TypeCode_ENUM types while parsing Spanner queried rows using this library

Describe alternatives you've considered
The alternative would be to use the raw spanner client to parse queried rows, but I wanted to use GORM package, which depends on go-sql-spanner library.

@henriquegmendes henriquegmendes added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant