Skip to content

Conversation

@olavloite
Copy link
Collaborator

Adds an option to decode arrays to primitive Go array types. This enables the use of []bool, []int64, []float32, []float64, and []string arrays with the Spanner database/sql driver.

Enabling this option and trying to decode an array that contains a NULL element will result in an error being returned.

Fixes #331

Updates googleapis/go-gorm-spanner#130
Updates googleapis/go-gorm-spanner#133

Adds an option to decode arrays to primitive Go array types.
This enables the use of []bool, []int64, []float32, []float64,
and []string arrays with the Spanner database/sql driver.

Enabling this option and trying to decode an array that contains
a NULL element will result in an error being returned.

Fixes #331
Updates googleapis/go-gorm-spanner#130
Updates googleapis/go-gorm-spanner#133
@olavloite olavloite requested a review from a team as a code owner January 31, 2025 08:25
@olavloite olavloite changed the title feat: option for decode to primitive array feat: option for decode to native array Jan 31, 2025
@olavloite olavloite merged commit 05952e0 into main Feb 3, 2025
16 checks passed
@olavloite olavloite deleted the decode-to-primitive-array branch February 3, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with Storing Array of Strings in Spanner Using GORM

2 participants