You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/07/23 11:18:09 UTC

[GitHub] [calcite-avatica-go] trusch commented on a change in pull request #43: add Connector implementation

trusch commented on a change in pull request #43: add Connector implementation
URL: https://github.com/apache/calcite-avatica-go/pull/43#discussion_r306263260
 
 

 ##########
 File path: driver.go
 ##########
 @@ -47,10 +47,18 @@ import (
 // Driver is exported to allow it to be used directly.
 type Driver struct{}
 
-// Open a Connection to the server.
-// See https://github.com/apache/calcite-avatica-go#dsn for more information
-// on how the DSN is formatted.
-func (a *Driver) Open(dsn string) (driver.Conn, error) {
+// Connector implements the driver.Connector interface
+type Connector struct {
+	additionalInfos   map[string]string
+	additionalHeaders map[string]string
 
 Review comment:
   I see this being even more usefull, but then the existing auth code would basically needs to be removed since it would touch the supplied http client (setting the transport).
   
   I could leave it as it is, and only overwrite the transport if no http client was passed by the user. What do you think, would a user be confused if he supplies a http client and specifies for example the kerberos settings and things wouldn't work?
   
   IMO with that option to pass in a http client it would just be consequently to not do any auth stuff within the driver. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services