Skip to content

Expose underlying *spanner.Client from SpannerConn #312

@egonelbre

Description

@egonelbre

Currently there are several issues that have come up that could be worked around with using *spanner.Client directly.

For example:

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()
	...
})

Metadata

Metadata

Assignees

No one assigned

    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