-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.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.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Currently there are several issues that have come up that could be worked around with using *spanner.Client directly.
For example:
- Unable to scan JSON data into
[]byteorjson.RawMessage#284 - Unable to scan into an array of struct #309
- Previously also structs not supported #281
By allowing to access *spanner.Client directly, it would make it easier to workaround issues that don't have yet parity in go-sql-spanner.
For workaround it's of course possible to use spanner.NewClient in addition to database/sql, but that would mean needing to manage multiple connection pools and also thread that access throughout the system.
It would be nice if you can use:
if err := conn.Raw(func(driverConn interface{}) error {
spannerconn := driverConn.(spannerdriver.SpannerConn)
client, err := spannerconn.UnderlyingClient()
...
})thepaul
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.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.‘Nice-to-have’ improvement, new feature or different behavior or design.