Skip to content

Support row parsing for PROTO & ENUM column Types #333

Open
@henriquegmendes

Description

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.

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions