frbvianna commented on code in PR #2558:
URL: https://github.com/apache/arrow-adbc/pull/2558#discussion_r1970138253


##########
go/adbc/driver/snowflake/driver.go:
##########
@@ -170,19 +171,30 @@ func quoteTblName(name string) string {
        return "\"" + strings.ReplaceAll(name, "\"", "\"\"") + "\""
 }
 
+type DriverOption func(*gosnowflake.Config) error
+
+func WithTransporter(transporter http.RoundTripper) DriverOption {
+       return func(cfg *gosnowflake.Config) error {
+               cfg.Transporter = transporter
+               return nil
+       }
+}
+
 type driverImpl struct {
        driverbase.DriverImplBase
+
+       opts []DriverOption
 }
 
 // NewDriver creates a new Snowflake driver using the given Arrow allocator.
-func NewDriver(alloc memory.Allocator) adbc.Driver {
+func NewDriver(alloc memory.Allocator, opts ...DriverOption) adbc.Driver {

Review Comment:
   This would be good, but my understanding is that we cannot add new inputs to 
`NewDatabase` without differing from the `adbc.Database` interface... since the 
only input to `NewDatabase` is the `map[string]string`, I could not think of a 
different way to achieve this other than to initialize the options in the 
driver instead. However, this still ensures that we can set the transport for a 
single Database, which was the objective.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to