zeroshade commented on code in PR #2558:
URL: https://github.com/apache/arrow-adbc/pull/2558#discussion_r1974019279
##########
go/adbc/driver/snowflake/driver.go:
##########
@@ -170,22 +171,48 @@ func quoteTblName(name string) string {
return "\"" + strings.ReplaceAll(name, "\"", "\"\"") + "\""
}
+type config struct {
+ *gosnowflake.Config
+}
+
+type Option func(*config) error
Review Comment:
need a docstring
##########
go/adbc/driver/snowflake/driver.go:
##########
@@ -170,22 +171,48 @@ func quoteTblName(name string) string {
return "\"" + strings.ReplaceAll(name, "\"", "\"\"") + "\""
}
+type config struct {
+ *gosnowflake.Config
+}
+
+type Option func(*config) error
+
+// WithTransporter sets the custom transporter to use for the Snowflake
connection.
+// This allows to intercept HTTP requests and responses.
+func WithTransporter(transporter http.RoundTripper) Option {
+ return func(cfg *config) error {
+ cfg.Transporter = transporter
+ return nil
+ }
+}
+
+type Driver interface {
Review Comment:
docstring please
##########
go/adbc/driver/snowflake/driver.go:
##########
@@ -170,22 +171,48 @@ func quoteTblName(name string) string {
return "\"" + strings.ReplaceAll(name, "\"", "\"\"") + "\""
}
+type config struct {
+ *gosnowflake.Config
+}
+
+type Option func(*config) error
+
+// WithTransporter sets the custom transporter to use for the Snowflake
connection.
+// This allows to intercept HTTP requests and responses.
+func WithTransporter(transporter http.RoundTripper) Option {
+ return func(cfg *config) error {
+ cfg.Transporter = transporter
+ return nil
+ }
+}
+
+type Driver interface {
+ adbc.Driver
+ NewDatabaseWithOptions(map[string]string, ...Option) (adbc.Database,
error)
Review Comment:
docstring
--
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]