Skip to content

Commit 724dc7e

Browse files
committed
add compatibility param
1 parent ac5d66d commit 724dc7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clickhouse_options.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ func (o *Options) fromDSN(in string) error {
9292
o.Auth.Database = strings.TrimPrefix(dsn.Path, "/")
9393
for v := range params {
9494
switch v {
95+
case "database":
96+
if len(o.Auth.Database) == 0 {
97+
o.Auth.Database = v
98+
}
9599
case "debug":
96100
o.Debug, _ = strconv.ParseBool(params.Get(v))
97101
case "compress":

0 commit comments

Comments
 (0)