From 8cd9761d2989f71fdac6dd18bf4d3ebf5b1b9a5f Mon Sep 17 00:00:00 2001 From: Kirill Shvakov Date: Wed, 21 Jun 2017 23:10:43 +0300 Subject: [PATCH] fix: set current database --- database/clickhouse/clickhouse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/clickhouse/clickhouse.go b/database/clickhouse/clickhouse.go index fba4541..fffc558 100644 --- a/database/clickhouse/clickhouse.go +++ b/database/clickhouse/clickhouse.go @@ -80,7 +80,7 @@ func (ch *ClickHouse) Open(dsn string) (database.Driver, error) { func (ch *ClickHouse) init() error { if len(ch.config.DatabaseName) == 0 { - if err := ch.conn.QueryRow("SELECT currentDatabase()").Scan(ch.config.DatabaseName); err != nil { + if err := ch.conn.QueryRow("SELECT currentDatabase()").Scan(&ch.config.DatabaseName); err != nil { return err } }