joshelser commented on a change in pull request #54:
URL: https://github.com/apache/calcite-avatica-go/pull/54#discussion_r470045597
##########
File path: dsn.go
##########
@@ -207,7 +207,8 @@ func ParseDSN(dsn string) (*Config, error) {
}
if parsed.Path != "" {
- conf.schema = strings.TrimPrefix(parsed.Path, "/")
+ s := strings.Split(parsed.Path, "/")
+ conf.schema = s[len(s)-1]
Review comment:
Chatting with Josiah (coworker), we're both looking at what
go-sql-driver/mysql does, and found
https://github.com/go-sql-driver/mysql/blob/master/dsn.go#L168 /
https://godoc.org/github.com/go-sql-driver/mysql#Config.FormatDSN
I think the "concerns" I have with the above could be done away with a
similar method that can accept a struct and format the DSN for the user (to
pass into `sql.Open()`)? WDYT @F21, you're the Go expert compared to me ;)
----------------------------------------------------------------
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:
[email protected]