Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD committed May 28, 2020
1 parent 9ec51cb commit 5d57a5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/conn/basedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func (d *DefaultDBProviderImpl) Apply(config config.DBConfig) (*BaseDB, error) {
}

for key, val := range config.Session {
// for num such as 1/"1", format as key='1'
// for string, format as key='string'
// both are valid for mysql and tidb
dsn += fmt.Sprintf("&%s='%s'", key, url.QueryEscape(val))
}

Expand Down

0 comments on commit 5d57a5b

Please sign in to comment.