Support row parsing for PROTO & ENUM column Types #333
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.
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 triggeredDescribe the solution you'd like
Add support to
TypeCode_PROTO
&TypeCode_ENUM
types while parsing Spanner queried rows using this libraryDescribe 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.
The text was updated successfully, but these errors were encountered: