Skip to content

Conversation

@mariusvniekerk
Copy link
Member

Add a new database constructor NewDatabaseWithOptions to allow passing arbitrary user-specified grpc dial options.

This is useful for constructs like

driver := flightsql.NewDriver(memory.DefaultAllocator)
driver.NewDatabaseWithOptions(map[string]string{
		"uri": uri,
	},
	grpc.WithStatsHandler(otelgrpc.NewClientHandler())
)

which allows usage of the opentelemetry grpc instrumentation for example.

This also provides an escape valve for users that need the ability to use less commonly used grpc client features that we have not exposed via the string map args.

…ions in NewDatabase

Add a new database constructor NewDatabaseWithOptions to allow passing arbitrary user-specified grpc dial options.

This is useful for constructs like
```go
driver := flightsql.NewDriver(memory.DefaultAllocator)
driver.NewDatabaseWithOptions(map[string]string{
		"uri": uri,
	},
	grpc.WithStatsHandler(otelgrpc.NewClientHandler())
)
```

which allows usage of the opentelemetry grpc instrumentation for example.

This also provides an escape valve for users that need the ability to use less commonly used grpc client features that we have not exposed via the string map args.
@github-actions github-actions bot added this to the ADBC Libraries 17 milestone Feb 26, 2025
driverbase.DriverImplBase
}

type Driver interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a docstring please

@zeroshade zeroshade merged commit 28a87ea into apache:main Feb 27, 2025
40 checks passed
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.

2 participants